]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
cache: fix pwd use-after-free in setting up fallback
authormjg <mjg@FreeBSD.org>
Mon, 5 Oct 2020 19:38:51 +0000 (19:38 +0000)
committermjg <mjg@FreeBSD.org>
Mon, 5 Oct 2020 19:38:51 +0000 (19:38 +0000)
commitb37d2bf09944688ba83501f924edeeaa834a4a5a
tree4e348b9a8c3501456eb405f8be020edaa203c7a8
parent2b52891d75ec5c710d69486fc3bb529d5abbd775
cache: fix pwd use-after-free in setting up fallback

Since the code exits smr section prior to calling pwd_hold, the used
pwd can be freed and a new one allocated with the same address, making
the comparison erroneously true.

Note it is very unlikely anyone ran into it.
sys/kern/kern_descrip.c
sys/kern/vfs_cache.c
sys/sys/filedesc.h