diff options
author | Jan Kara <jack@suse.cz> | 2014-01-28 18:29:24 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2014-01-29 13:57:04 +0100 |
commit | 13116dfd13c8c9d60ea04ece13419af2de8e2e37 (patch) | |
tree | bad7a21d6c43925fe4e7102f9816847ed133e775 /tools | |
parent | 0e47c969c65e213421450c31043353ebe3c67e0c (diff) | |
download | linux-stable-13116dfd13c8c9d60ea04ece13419af2de8e2e37.tar.gz linux-stable-13116dfd13c8c9d60ea04ece13419af2de8e2e37.tar.bz2 linux-stable-13116dfd13c8c9d60ea04ece13419af2de8e2e37.zip |
fanotify: Fix use after free in mask checking
We cannot use the event structure returned from
fsnotify_add_notify_event() because that event can be freed by the time
that function returns. Use the mask argument passed into the event
handler directly instead. This also fixes a possible problem when we
could unnecessarily wait for permission response for a normal fanotify
event which got merged with a permission event.
We also disallow merging of permission event with any other event so
that we know the permission event which we just created is the one on
which we should wait for permission response.
Reported-and-tested-by: Jiri Kosina <jkosina@suse.cz>
Reported-and-tested-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions