fs: prevent use after free in auditing when symlink following was denied
authorSasha Levin <sasha.levin@oracle.com>
Thu, 4 Oct 2012 23:56:40 +0000 (19:56 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Oct 2012 16:32:42 +0000 (09:32 -0700)
commitcd7700b6aa48cc94b83ad54eb3cb1fea38c0d2c8
tree8c15703f6d685b265b782c3aa8162efdc0d697c8
parent724373bd489eb02e1999e2714fcc00658e081a9b
fs: prevent use after free in auditing when symlink following was denied

commit ffd8d101a3a7d3f2e79deee1e342801703b6dc70 upstream.

Commit "fs: add link restriction audit reporting" has added auditing of failed
attempts to follow symlinks. Unfortunately, the auditing was being done after
the struct path structure was released earlier.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/namei.c