mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
pseudofs: limit writes to 1M
Noted and reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D29752
This commit is contained in:
parent
116f26f947
commit
5edf7227ec
1 changed files with 3 additions and 0 deletions
|
|
@ -1102,6 +1102,9 @@ pfs_write(struct vop_write_args *va)
|
|||
if (pn->pn_fill == NULL)
|
||||
PFS_RETURN (EIO);
|
||||
|
||||
if (uio->uio_resid > PFS_MAXBUFSIZ)
|
||||
PFS_RETURN (EIO);
|
||||
|
||||
/*
|
||||
* This is necessary because either process' privileges may
|
||||
* have changed since the open() call.
|
||||
|
|
|
|||
Loading…
Reference in a new issue