mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 08:58:07 +00:00
4b4391e77a
After installing the anonymous fd, we can now see it in userland and close
it. However, at this point we may not have gotten the reference count of
the cache, but we will put it during colse fd, so this may cause a cache
UAF.
So grab the cache reference count before fd_install(). In addition, by
kernel convention, fd is taken over by the user land after fd_install(),
and the kernel should not call close_fd() after that, i.e., it should call
fd_install() after everything is ready, thus fd_install() is called after
copy_to_user() succeeds.
Fixes:
|
||
---|---|---|
.. | ||
cache.c | ||
daemon.c | ||
error_inject.c | ||
interface.c | ||
internal.h | ||
io.c | ||
Kconfig | ||
key.c | ||
main.c | ||
Makefile | ||
namei.c | ||
ondemand.c | ||
security.c | ||
volume.c | ||
xattr.c |