]> www.infradead.org Git - users/dwmw2/linux.git/commit
dump_common_audit_data(): fix racy accesses to ->d_name
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 5 Jan 2021 19:43:46 +0000 (14:43 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Jan 2021 14:48:43 +0000 (15:48 +0100)
commit2f121a8d64753b3a2d51a97e9c345668feff76f8
tree0d1a3402b7f05e2221cf247d62b06e73786ccd92
parent00b646138a9a0771c8806f1c61a8d5c58d53bade
dump_common_audit_data(): fix racy accesses to ->d_name

commit d36a1dd9f77ae1e72da48f4123ed35627848507d upstream.

We are not guaranteed the locking environment that would prevent
dentry getting renamed right under us.  And it's possible for
old long name to be freed after rename, leading to UAF here.

Cc: stable@kernel.org # v2.6.2+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
security/lsm_audit.c