diff options
author | Jan Kara <[email protected]> | 2017-08-15 13:00:36 +0200 |
---|---|---|
committer | Paul Moore <[email protected]> | 2017-08-15 15:58:17 -0400 |
commit | d76036ab47eafa6ce52b69482e91ca3ba337d6d6 (patch) | |
tree | 36e9cad8d69f7b801ef976a4f86a5276e7c59fe5 /tools/perf/scripts/python/sched-migration.py | |
parent | b0659ae5e30074ede1dc08f2c6d64f0c11d64e0f (diff) |
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]>
Diffstat (limited to 'tools/perf/scripts/python/sched-migration.py')
0 files changed, 0 insertions, 0 deletions