Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142178878
D29752.id87396.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
813 B
Referenced Files
None
Subscribers
None
D29752.id87396.diff
View Options
diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c
--- a/sys/fs/pseudofs/pseudofs_vnops.c
+++ b/sys/fs/pseudofs/pseudofs_vnops.c
@@ -1102,6 +1102,9 @@
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.
diff --git a/sys/kern/subr_sbuf.c b/sys/kern/subr_sbuf.c
--- a/sys/kern/subr_sbuf.c
+++ b/sys/kern/subr_sbuf.c
@@ -266,6 +266,10 @@
KASSERT(error != NULL,
("%s called with NULL error pointer", __func__));
+ if (uio->uio_resid >= INT_MAX || uio->uio_resid < SBUF_MINSIZE) {
+ *error = EINVAL;
+ return (NULL);
+ }
s = sbuf_new(s, NULL, uio->uio_resid + 1, 0);
if (s == NULL) {
*error = ENOMEM;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 17, 9:11 PM (12 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27699309
Default Alt Text
D29752.id87396.diff (813 B)
Attached To
Mode
D29752: sbuf_uionew(): sbuf_new() takes int as length
Attached
Detach File
Event Timeline
Log In to Comment