Closed ensc closed 4 months ago
https://github.com/shadow-maint/shadow/blob/2b67dc77651874999258c9ca4ebd57ed03cabe37/lib/copydir.c#L426-L434
assumes that fstatat() does not clobber sb on errors. But there is no such guarantee so that the following code might access uninitialized/random data within sb.
fstatat()
sb
The fstatat() call should be done with a temporary buffer.
https://github.com/shadow-maint/shadow/blob/2b67dc77651874999258c9ca4ebd57ed03cabe37/lib/copydir.c#L426-L434
assumes that
fstatat()
does not clobbersb
on errors. But there is no such guarantee so that the following code might access uninitialized/random data withinsb
.The
fstatat()
call should be done with a temporary buffer.