mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
Fix NULL pointer dereference in freebsd4_getfsstat. [EN-18:10.syscall]
Reported by: Thomas Barabosch, Fraunhofer FKIE Approved by: so Security: FreeBSD-EN-18:10.syscall Security: CVE-2018-17154
This commit is contained in:
parent
c0c9a2d80a
commit
8eaf017b4e
1 changed files with 2 additions and 0 deletions
|
|
@ -643,6 +643,8 @@ freebsd4_getfsstat(td, uap)
|
|||
size = count * sizeof(struct statfs);
|
||||
error = kern_getfsstat(td, &buf, size, &count, UIO_SYSSPACE,
|
||||
uap->mode);
|
||||
if (buf == NULL)
|
||||
return (EINVAL);
|
||||
td->td_retval[0] = count;
|
||||
if (size != 0) {
|
||||
sp = buf;
|
||||
|
|
|
|||
Loading…
Reference in a new issue