aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-mpc5200.c
diff options
context:
space:
mode:
authorEdward Adam Davis <[email protected]>2025-07-21 14:26:51 +0000
committerChristian Brauner <[email protected]>2025-07-23 11:54:34 +0000
commit8b3c655fa2406b9853138142746a39b7615c54a2 (patch)
tree957268b68102383ce188cb0f81775931bfb4ad3c /drivers/gpio/gpio-mpc5200.c
parentafs: Fix check for NULL terminator (diff)
downloadkernel-8b3c655fa2406b9853138142746a39b7615c54a2.tar.gz
kernel-8b3c655fa2406b9853138142746a39b7615c54a2.zip
afs: Set vllist to NULL if addr parsing fails
syzbot reported a bug in in afs_put_vlserverlist. kAFS: bad VL server IP address BUG: unable to handle page fault for address: fffffffffffffffa ... Oops: Oops: 0002 [#1] SMP KASAN PTI ... RIP: 0010:refcount_dec_and_test include/linux/refcount.h:450 [inline] RIP: 0010:afs_put_vlserverlist+0x3a/0x220 fs/afs/vl_list.c:67 ... Call Trace: <TASK> afs_alloc_cell fs/afs/cell.c:218 [inline] afs_lookup_cell+0x12a5/0x1680 fs/afs/cell.c:264 afs_cell_init+0x17a/0x380 fs/afs/cell.c:386 afs_proc_rootcell_write+0x21f/0x290 fs/afs/proc.c:247 proc_simple_write+0x114/0x1b0 fs/proc/generic.c:825 pde_write fs/proc/inode.c:330 [inline] proc_reg_write+0x23d/0x330 fs/proc/inode.c:342 vfs_write+0x25c/0x1180 fs/read_write.c:682 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Because afs_parse_text_addrs() parses incorrectly, its return value -EINVAL is assigned to vllist, which results in -EINVAL being used as the vllist address when afs_put_vlserverlist() is executed. Set the vllist value to NULL when a parsing error occurs to avoid this issue. Fixes: e2c2cb8ef07a ("afs: Simplify cell record handling") Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=5c042fbab0b292c98fc6 Tested-by: [email protected] Signed-off-by: Edward Adam Davis <[email protected]> Signed-off-by: David Howells <[email protected]> Link: https://lore.kernel.org/[email protected] cc: Marc Dionne <[email protected]> cc: [email protected] cc: [email protected] Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'drivers/gpio/gpio-mpc5200.c')
0 files changed, 0 insertions, 0 deletions