]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Ensure that dirent's d_off field is initialized
authorMark Johnston <markj@FreeBSD.org>
Sun, 3 Jan 2021 16:32:30 +0000 (11:32 -0500)
committerEd Maste <emaste@FreeBSD.org>
Fri, 29 Jan 2021 01:14:58 +0000 (20:14 -0500)
commit6bddcd7682b1ac90f01134c7ffa3f9ed023b1338
tree9197ef4b37b7b7a29ba9d0a5b5483f31cb279bf9
parent545f860883cf02fc152696186436ffe6adf8f1a7
Ensure that dirent's d_off field is initialized

We have the d_off field in struct dirent for providing the seek offset
of the next directory entry.  Several filesystems were not initializing
the field, which ends up being copied out to userland.

Reported by: Syed Faraz Abrar <faraz@elttam.com>
Reviewed by: kib

(cherry picked from commit 90f580b954090e669da234f6c8e8d0379ff9d8bc)
(cherry picked from commit acaac0eefa1f2675dfc49faa077e3fb10949d540)

Approved by: so
Security: CVE-2020-25578
sys/fs/autofs/autofs_vnops.c
sys/fs/smbfs/smbfs_io.c
sys/fs/tmpfs/tmpfs_subr.c
sys/kern/uipc_mqueue.c