Files
linux/kernel
Jan Kara d76036ab47 audit: Fix use after free in audit_remove_watch_rule()
audit_remove_watch_rule() drops watch's reference to parent but then
continues to work with it. That is not safe as parent can get freed once
we drop our reference. The following is a trivial reproducer:

mount -o loop image /mnt
touch /mnt/file
auditctl -w /mnt/file -p wax
umount /mnt
auditctl -D
<crash in fsnotify_destroy_mark()>

Grab our own reference in audit_remove_watch_rule() earlier to make sure
mark does not get freed under us.

CC: [email protected]
Reported-by: Tony Jones <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Tested-by: Tony Jones <[email protected]>
Signed-off-by: Paul Moore <[email protected]>
2017-08-15 15:58:17 -04:00
..
…
…
2017-06-12 18:07:43 -04:00
…
2017-01-12 07:01:56 -07:00
…
…
…
…
…
…
…
2017-03-24 21:51:33 +08:00
…
…
…
2017-02-27 18:43:47 -08:00
…
2016-12-22 22:58:37 -05:00