]> git.baikalelectronics.ru Git - kernel.git/commit
audit: fix exe_file access in audit_exe_compare
authorMateusz Guzik <mguzik@redhat.com>
Tue, 23 Aug 2016 14:20:39 +0000 (16:20 +0200)
committerPaul Moore <paul@paul-moore.com>
Wed, 31 Aug 2016 20:16:35 +0000 (16:16 -0400)
commitd0a30e4923cefdbc1469d2223e38f512fabd0f85
tree6ebac44194021885b9f79e72193ee243391dc7ed
parent3678432d2ffa8e6c272582ed8a7139c83f8a0b56
audit: fix exe_file access in audit_exe_compare

Prior to the change the function would blindly deference mm, exe_file
and exe_file->f_inode, each of which could have been NULL or freed.

Use get_task_exe_file to safely obtain stable exe_file.

Signed-off-by: Mateusz Guzik <mguzik@redhat.com>
Acked-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Acked-by: Richard Guy Briggs <rgb@redhat.com>
Cc: <stable@vger.kernel.org> # 4.3.x
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/audit_watch.c