Skip to content

Commit 69b8923

Browse files
committed
Merge tag 'for-linus-6.14-ofs4' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux
Pull orangefs fix from Mike Marshall: "Fix a oob in orangefs_debug_write I got a syzbot report: "slab-out-of-bounds Read in orangefs_debug_write" Several people suggested fixes, I tested Al Viro's suggestion and made this patch" * tag 'for-linus-6.14-ofs4' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: fix a oob in orangefs_debug_write
2 parents b2fde87 + f7c8484 commit 69b8923

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/orangefs/orangefs-debugfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,9 @@ static ssize_t orangefs_debug_write(struct file *file,
392392
* Thwart users who try to jamb a ridiculous number
393393
* of bytes into the debug file...
394394
*/
395-
if (count > ORANGEFS_MAX_DEBUG_STRING_LEN + 1) {
395+
if (count > ORANGEFS_MAX_DEBUG_STRING_LEN) {
396396
silly = count;
397-
count = ORANGEFS_MAX_DEBUG_STRING_LEN + 1;
397+
count = ORANGEFS_MAX_DEBUG_STRING_LEN;
398398
}
399399

400400
buf = kzalloc(ORANGEFS_MAX_DEBUG_STRING_LEN, GFP_KERNEL);

0 commit comments

Comments
 (0)