general protection fault in dvb_usbv2_generic_write
Subsystems (2)
syzbot
syzbotHello,
syzbot found the following issue on:
HEAD commit: 5dadc1be8fc5 Merge tag 'char-misc-6.11-rc7' of git://git.k.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=16784e00580000 kernel config: https://syzkaller.appspot.com/x/.config?x=58a85aa6925a8b78 dashboard link: https://syzkaller.appspot.com/bug?extid=f9f5333782a854509322 compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 userspace arch: i386
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/21e48b60b45c/disk-5dadc1be.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/92982a88343c/vmlinux-5dadc1be.xz
kernel image: https://storage.googleapis.com/syzbot-assets/2149656ca3d1/bzImage-5dadc1be.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000019: 0000 [#1] PREEMPT SMP KASAN PTI KASAN: null-ptr-deref in range [0x00000000000000c8-0x00000000000000cf] CPU: 0 UID: 0 PID: 10852 Comm: syz.3.1595 Not tainted 6.11.0-rc6-syzkaller-00355-g5dadc1be8fc5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 RIP: 0010:__mutex_lock_common kernel/locking/mutex.c:587 [inline] RIP: 0010:__mutex_lock+0xf2/0xd70 kernel/locking/mutex.c:752 Code: c0 c0 b9 33 9a 48 c1 e8 03 42 0f b6 04 20 84 c0 0f 85 79 0b 00 00 83 3d bb 28 71 0e 00 75 21 49 8d 7d 60 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 74 05 e8 b2 42 38 f6 4d 39 6d 60 0f 85 f3 0a 00 00 RSP: 0018:ffffc9000313ef60 EFLAGS: 00010202 RAX: 0000000000000019 RBX: 0000000000000000 RCX: ffffffff9a33b903 RDX: dffffc0000000000 RSI: ffff888030280000 RDI: 00000000000000c8 RBP: ffffc9000313f0b8 R08: ffffc9000313f027 R09: 0000000000000000 R10: ffffc9000313f000 R11: fffff52000627e05 R12: dffffc0000000000 R13: 0000000000000068 R14: 0000000000000000 R15: ffff888060c51958 FS: 0000000000000000(0000) GS:ffff8880b8800000(0063) knlGS:00000000f5776b40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 00007f35653215e8 CR3: 0000000028422000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> dvb_usbv2_generic_write+0x26/0x50 drivers/media/usb/dvb-usb-v2/dvb_usb_urb.c:77 mxl111sf_ctrl_msg+0x143/0x270 drivers/media/usb/dvb-usb-v2/mxl111sf.c:73 mxl111sf_write_reg+0xd8/0x1f0 drivers/media/usb/dvb-usb-v2/mxl111sf.c:123 mxl111sf_i2c_start drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c:130 [inline] mxl111sf_i2c_xfer+0x91e/0x8a30 drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c:813 __i2c_transfer+0x866/0x21f0 i2c_transfer+0x271/0x3b0 drivers/i2c/i2c-core-base.c:2304 i2cdev_ioctl_rdwr+0x452/0x700 drivers/i2c/i2c-dev.c:309 compat_i2cdev_ioctl+0x7ca/0x8e0 drivers/i2c/i2c-dev.c:576 __do_compat_sys_ioctl fs/ioctl.c:1007 [inline] __se_compat_sys_ioctl+0x51c/0xca0 fs/ioctl.c:950 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0xb4/0x110 arch/x86/entry/common.c:386 do_fast_syscall_32+0x34/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf747d579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f577656c EFLAGS: 00000206 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000000707 RDX: 0000000020001100 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 </TASK> Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__mutex_lock_common kernel/locking/mutex.c:587 [inline] RIP: 0010:__mutex_lock+0xf2/0xd70 kernel/locking/mutex.c:752 Code: c0 c0 b9 33 9a 48 c1 e8 03 42 0f b6 04 20 84 c0 0f 85 79 0b 00 00 83 3d bb 28 71 0e 00 75 21 49 8d 7d 60 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 74 05 e8 b2 42 38 f6 4d 39 6d 60 0f 85 f3 0a 00 00 RSP: 0018:ffffc9000313ef60 EFLAGS: 00010202 RAX: 0000000000000019 RBX: 0000000000000000 RCX: ffffffff9a33b903 RDX: dffffc0000000000 RSI: ffff888030280000 RDI: 00000000000000c8 RBP: ffffc9000313f0b8 R08: ffffc9000313f027 R09: 0000000000000000 R10: ffffc9000313f000 R11: fffff52000627e05 R12: dffffc0000000000 R13: 0000000000000068 R14: 0000000000000000 R15: ffff888060c51958 FS: 0000000000000000(0000) GS:ffff8880b8800000(0063) knlGS:00000000f5776b40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 000055f273f047f0 CR3: 0000000028422000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: c0 c0 b9 rol $0xb9,%al 3: 33 9a 48 c1 e8 03 xor 0x3e8c148(%rdx),%ebx 9: 42 0f b6 04 20 movzbl (%rax,%r12,1),%eax e: 84 c0 test %al,%al 10: 0f 85 79 0b 00 00 jne 0xb8f 16: 83 3d bb 28 71 0e 00 cmpl $0x0,0xe7128bb(%rip) # 0xe7128d8 1d: 75 21 jne 0x40 1f: 49 8d 7d 60 lea 0x60(%r13),%rdi 23: 48 89 f8 mov %rdi,%rax 26: 48 c1 e8 03 shr $0x3,%rax * 2a: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) <-- trapping instruction 2f: 74 05 je 0x36 31: e8 b2 42 38 f6 call 0xf63842e8 36: 4d 39 6d 60 cmp %r13,0x60(%r13) 3a: 0f 85 f3 0a 00 00 jne 0xb33
---
This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at [email protected].
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
syzbot
syzbotsyzbot has found a reproducer for the following issue on:
syzbot has found a reproducer for the following issue on:
HEAD commit: 8ffd015db85f Linux 6.15-rc2 git tree: upstream console+strace: https://syzkaller.appspot.com/x/log.txt?x=11fca0cc580000 kernel config: https://syzkaller.appspot.com/x/.config?x=a972ee73c2fcf8ca dashboard link: https://syzkaller.appspot.com/bug?extid=f9f5333782a854509322 compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12827398580000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=161620cc580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/2640fd4fd0f2/disk-8ffd015d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/1c5931df89bc/vmlinux-8ffd015d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/f8fece45017d/bzImage-8ffd015d.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000019: 0000 [#1] SMP KASAN PTI KASAN: null-ptr-deref in range [0x00000000000000c8-0x00000000000000cf] CPU: 1 UID: 0 PID: 5849 Comm: syz-executor279 Not tainted 6.15.0-rc2-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 RIP: 0010:__mutex_lock_common kernel/locking/mutex.c:580 [inline] RIP: 0010:__mutex_lock+0x15d/0x10c0 kernel/locking/mutex.c:746 Code: c0 80 f6 73 9a 48 c1 e8 03 42 0f b6 04 38 84 c0 0f 85 07 0e 00 00 83 3d 40 ba 41 0e 00 75 21 49 8d 7e 60 48 89 f8 48 c1 e8 03 <42> 80 3c 38 00 74 05 e8 17 52 fb f5 4d 39 76 60 0f 85 81 0d 00 00 RSP: 0018:ffffc90004206f80 EFLAGS: 00010202 RAX: 0000000000000019 RBX: ffffc90004207040 RCX: ffffffff9a73f603 RDX: ffff888035f65a00 RSI: ffffffff8e4fde18 RDI: 00000000000000c8 RBP: ffffc90004207118 R08: ffffc90004207087 R09: 0000000000000000 R10: ffffc90004207060 R11: fffff52000840e11 R12: 0000000000000000 R13: ffffc90004207048 R14: 0000000000000068 R15: dffffc0000000000 FS: 0000555594939380(0000) GS:ffff888125093000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f79554c50f0 CR3: 000000007cfd2000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> dvb_usbv2_generic_write+0x26/0x50 drivers/media/usb/dvb-usb-v2/dvb_usb_urb.c:77 mxl111sf_ctrl_msg+0x172/0x2e0 drivers/media/usb/dvb-usb-v2/mxl111sf.c:73 mxl111sf_write_reg+0xda/0x1f0 drivers/media/usb/dvb-usb-v2/mxl111sf.c:123 mxl111sf_i2c_start drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c:130 [inline] mxl111sf_i2c_sw_xfer_msg drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c:-1 [inline] mxl111sf_i2c_xfer+0x923/0x8aa0 drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c:813 __i2c_transfer+0x859/0x2250 drivers/i2c/i2c-core-base.c:-1 i2c_transfer+0x2c2/0x430 drivers/i2c/i2c-core-base.c:2315 i2c_transfer_buffer_flags+0x182/0x260 drivers/i2c/i2c-core-base.c:2343 i2c_master_recv include/linux/i2c.h:79 [inline] i2cdev_read+0x10a/0x220 drivers/i2c/i2c-dev.c:155 vfs_read+0x21f/0xb90 fs/read_write.c:568 ksys_read+0x19d/0x2d0 fs/read_write.c:713 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f795544e4e9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 17 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffc002847a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000200000000000 RCX: 00007f795544e4e9 RDX: 0000000000000063 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00000000000f4240 R08: 00232d6332692f76 R09: 00000000000000a0 R10: 000000000000000f R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffc002849c8 R14: 00007ffc002847d0 R15: 00007ffc002847c0 </TASK> Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__mutex_lock_common kernel/locking/mutex.c:580 [inline] RIP: 0010:__mutex_lock+0x15d/0x10c0 kernel/locking/mutex.c:746 Code: c0 80 f6 73 9a 48 c1 e8 03 42 0f b6 04 38 84 c0 0f 85 07 0e 00 00 83 3d 40 ba 41 0e 00 75 21 49 8d 7e 60 48 89 f8 48 c1 e8 03 <42> 80 3c 38 00 74 05 e8 17 52 fb f5 4d 39 76 60 0f 85 81 0d 00 00 RSP: 0018:ffffc90004206f80 EFLAGS: 00010202
RAX: 0000000000000019 RBX: ffffc90004207040 RCX: ffffffff9a73f603 RDX: ffff888035f65a00 RSI: ffffffff8e4fde18 RDI: 00000000000000c8 RBP: ffffc90004207118 R08: ffffc90004207087 R09: 0000000000000000 R10: ffffc90004207060 R11: fffff52000840e11 R12: 0000000000000000 R13: ffffc90004207048 R14: 0000000000000068 R15: dffffc0000000000 FS: 0000555594939380(0000) GS:ffff888125093000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055dccfef9670 CR3: 000000007cfd2000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: c0 80 f6 73 9a 48 c1 rolb $0xc1,0x489a73f6(%rax) 7: e8 03 42 0f b6 call 0xb60f420f c: 04 38 add $0x38,%al e: 84 c0 test %al,%al 10: 0f 85 07 0e 00 00 jne 0xe1d 16: 83 3d 40 ba 41 0e 00 cmpl $0x0,0xe41ba40(%rip) # 0xe41ba5d 1d: 75 21 jne 0x40 1f: 49 8d 7e 60 lea 0x60(%r14),%rdi 23: 48 89 f8 mov %rdi,%rax 26: 48 c1 e8 03 shr $0x3,%rax * 2a: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1) <-- trapping instruction 2f: 74 05 je 0x36 31: e8 17 52 fb f5 call 0xf5fb524d 36: 4d 39 76 60 cmp %r14,0x60(%r14) 3a: 0f 85 81 0d 00 00 jne 0xdc1
---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
syzbot
syzbotForwarded: Re: [PATCH RFC v2] media: mxl111sf: initialize state->d and fe_lock in probe
In reply to syzbotFor archival purposes, forwarding an incoming command email to [email protected], [email protected].
For archival purposes, forwarding an incoming command email to [email protected], [email protected].
***
Subject: Re: [PATCH RFC v2] media: mxl111sf: initialize state->d and fe_lock in probe
Author: [email protected]
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git c03c1a14507dfaf8b856c2608f9ac216021fc222
drivers/media/usb/dvb-usb-v2/mxl111sf.c +2 -12
@@ -431,8 +431,6 @@ static int mxl111sf_lgdt3305_frontend_attach(struct dvb_usb_adapter *adap, u8 fepr_debug ("%s()\n" , __func__); -/* save a pointer to the dvb_usb_device in device state */ - state->d = d; adap_state->alt_mode = (dvb_usb_mxl111sf_isoc) ?2 :1 ; state->alt_mode = adap_state->alt_mode;
@@ -502,8 +500,6 @@ static int mxl111sf_lg2160_frontend_attach(struct dvb_usb_adapter *adap, u8 fe_ipr_debug ("%s()\n" , __func__); -/* save a pointer to the dvb_usb_device in device state */ - state->d = d; adap_state->alt_mode = (dvb_usb_mxl111sf_isoc) ?2 :1 ; state->alt_mode = adap_state->alt_mode;
@@ -587,8 +583,6 @@ static int mxl111sf_lg2161_frontend_attach(struct dvb_usb_adapter *adap, u8 fe_ipr_debug ("%s()\n" , __func__); -/* save a pointer to the dvb_usb_device in device state */ - state->d = d; adap_state->alt_mode = (dvb_usb_mxl111sf_isoc) ?2 :1 ; state->alt_mode = adap_state->alt_mode;
@@ -674,8 +668,6 @@ static int mxl111sf_lg2161_ep6_frontend_attach(struct dvb_usb_adapter *adap, u8pr_debug ("%s()\n" , __func__); -/* save a pointer to the dvb_usb_device in device state */ - state->d = d; adap_state->alt_mode = (dvb_usb_mxl111sf_isoc) ?2 :1 ; state->alt_mode = adap_state->alt_mode;
@@ -749,8 +741,6 @@ static int mxl111sf_attach_demod(struct dvb_usb_adapter *adap, u8 fe_id)pr_debug ("%s()\n" , __func__); -/* save a pointer to the dvb_usb_device in device state */ - state->d = d; adap_state->alt_mode = (dvb_usb_mxl111sf_isoc) ?1 :2 ; state->alt_mode = adap_state->alt_mode;
@@ -935,8 +925,6 @@ static int mxl111sf_init(struct dvb_usb_device *d)if (mxl_fail (ret))pr_err ("failed to get chip info during probe" ); -mutex_init (&state->fe_lock); -if (state->chip_rev >MXL111SF_V6 )mxl111sf_config_pin_mux_modes (state,PIN_MUX_TS_SPI_IN_MODE_1 );
@@ -1068,7 +1056,9 @@ static int mxl111sf_probe(struct dvb_usb_device *dev) {struct mxl111sf_state *state =d_to_priv (dev); + state->d = dev;mutex_init (&state->msg_lock); +mutex_init (&state->fe_lock);return 0 ; }