Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F165173576
D49674.id153178.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
478 B
Referenced Files
None
Subscribers
None
D49674.id153178.diff
View Options
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.
+ */
+ if (inoff < 0 || outoff < 0 || inoff + (ssize_t)len < 0 ||
+ outoff + (ssize_t)len < 0) {
+ error = EINVAL;
+ goto out;
+ }
+
/*
* If infp and outfp refer to the same file, the byte ranges cannot
* overlap.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 7, 1:43 PM (2 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36177089
Default Alt Text
D49674.id153178.diff (478 B)
Attached To
Mode
D49674: copy_file_range: Fix overlap checking
Attached
Detach File
Event Timeline
Log In to Comment