Page MenuHomeFreeBSD

D49674.1791124398.diff
No OneTemporary

Size
466 B
Referenced Files
None
Subscribers
None

D49674.1791124398.diff

diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -5075,6 +5075,15 @@
if (len == 0)
goto out;
+ /*
+ * Make sure that the ranges we check and lock below are valid. Note
+ * that len is clamped to SSIZE_MAX above.
+ */
+ if (inoff < 0 || outoff < 0) {
+ error = EINVAL;
+ goto out;
+ }
+
/*
* If infp and outfp refer to the same file, the byte ranges cannot
* overlap.

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 4, 2:33 PM (2 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30159512
Default Alt Text
D49674.1791124398.diff (466 B)

Event Timeline