linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [syzbot] [nfc?] UBSAN: shift-out-of-bounds in nci_activate_target
@ 2023-04-02 16:21 syzbot
  2023-07-07 10:22 ` syzbot
  2023-07-09  2:49 ` syzbot
  0 siblings, 2 replies; 4+ messages in thread
From: syzbot @ 2023-04-02 16:21 UTC (permalink / raw)
  To: davem, edumazet, krzysztof.kozlowski, kuba, linux-kernel,
	linux-nfc, netdev, pabeni, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    198925fae644 Add linux-next specific files for 20230329
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=1174a6d1c80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=91e70627549fd509
dashboard link: https://syzkaller.appspot.com/bug?extid=0839b78e119aae1fec78
compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/53c685bee82f/disk-198925fa.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/45e82baa3bc5/vmlinux-198925fa.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7c31fbc6acb9/bzImage-198925fa.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+0839b78e119aae1fec78@syzkaller.appspotmail.com

================================================================================
UBSAN: shift-out-of-bounds in net/nfc/nci/core.c:912:45
shift exponent 4294967071 is too large for 32-bit type 'int'
CPU: 1 PID: 30237 Comm: syz-executor.2 Not tainted 6.3.0-rc4-next-20230329-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x136/0x150 lib/dump_stack.c:106
 ubsan_epilogue lib/ubsan.c:217 [inline]
 __ubsan_handle_shift_out_of_bounds+0x221/0x5a0 lib/ubsan.c:387
 nci_activate_target.cold+0x1a/0x1f net/nfc/nci/core.c:912
 nfc_activate_target+0x1f8/0x4c0 net/nfc/core.c:420
 nfc_genl_activate_target+0x1f3/0x290 net/nfc/netlink.c:900
 genl_family_rcv_msg_doit.isra.0+0x1e6/0x2d0 net/netlink/genetlink.c:968
 genl_family_rcv_msg net/netlink/genetlink.c:1048 [inline]
 genl_rcv_msg+0x4ff/0x7e0 net/netlink/genetlink.c:1065
 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2572
 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1076
 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
 netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365
 netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1942
 sock_sendmsg_nosec net/socket.c:724 [inline]
 sock_sendmsg+0xde/0x190 net/socket.c:747
 ____sys_sendmsg+0x71c/0x900 net/socket.c:2501
 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2555
 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2584
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fc4abc8c0f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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:00007fc4aca02168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fc4abdabf80 RCX: 00007fc4abc8c0f9
RDX: 0000000000000000 RSI: 0000000020000780 RDI: 0000000000000005
RBP: 00007fc4abce7b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcb707727f R14: 00007fc4aca02300 R15: 0000000000022000
 </TASK>
================================================================================


---
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 syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [syzbot] [nfc?] UBSAN: shift-out-of-bounds in nci_activate_target
  2023-04-02 16:21 [syzbot] [nfc?] UBSAN: shift-out-of-bounds in nci_activate_target syzbot
@ 2023-07-07 10:22 ` syzbot
  2023-07-09  2:49 ` syzbot
  1 sibling, 0 replies; 4+ messages in thread
From: syzbot @ 2023-07-07 10:22 UTC (permalink / raw)
  To: anupnewsmail, davem, edumazet, krzysztof.kozlowski, kuba,
	linux-kernel, linux-nfc, netdev, pabeni, syzkaller-bugs

syzbot has found a reproducer for the following issue on:

HEAD commit:    a452483508d7 Merge tag 's390-6.5-2' of git://git.kernel.or..
git tree:       upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=161e174aa80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=7df0cabaf5becfdc
dashboard link: https://syzkaller.appspot.com/bug?extid=0839b78e119aae1fec78
compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=123fc664a80000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=12003f4aa80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/524f562d731e/disk-a4524835.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/253005f05b78/vmlinux-a4524835.xz
kernel image: https://storage.googleapis.com/syzbot-assets/1864a30871e7/bzImage-a4524835.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+0839b78e119aae1fec78@syzkaller.appspotmail.com

================================================================================
UBSAN: shift-out-of-bounds in net/nfc/nci/core.c:912:45
shift exponent 268435489 is too large for 32-bit type 'int'
CPU: 0 PID: 5028 Comm: syz-executor696 Not tainted 6.4.0-syzkaller-12155-ga452483508d7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x136/0x150 lib/dump_stack.c:106
 ubsan_epilogue lib/ubsan.c:217 [inline]
 __ubsan_handle_shift_out_of_bounds+0x221/0x5a0 lib/ubsan.c:387
 nci_activate_target.cold+0x1a/0x1f net/nfc/nci/core.c:912
 nfc_activate_target+0x1f8/0x4c0 net/nfc/core.c:420
 nfc_genl_activate_target+0x1f3/0x290 net/nfc/netlink.c:900
 genl_family_rcv_msg_doit.isra.0+0x1e6/0x2d0 net/netlink/genetlink.c:970
 genl_family_rcv_msg net/netlink/genetlink.c:1050 [inline]
 genl_rcv_msg+0x4ff/0x7e0 net/netlink/genetlink.c:1067
 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2549
 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1078
 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
 netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365
 netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1914
 sock_sendmsg_nosec net/socket.c:725 [inline]
 sock_sendmsg+0xde/0x190 net/socket.c:748
 ____sys_sendmsg+0x739/0x920 net/socket.c:2494
 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2548
 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2577
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7ff498fc3ab9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 16 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:00007ff49876f2e8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007ff4990542a0 RCX: 00007ff498fc3ab9
RDX: 0000000000000000 RSI: 0000000020000780 RDI: 0000000000000005
RBP: 00007ff49901a510 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005
R13: 0000000000000001 R14: 0000000000000000 R15: 00007ff4990542a8
 </TASK>
================================================================================


---
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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [syzbot] [nfc?] UBSAN: shift-out-of-bounds in nci_activate_target
  2023-04-02 16:21 [syzbot] [nfc?] UBSAN: shift-out-of-bounds in nci_activate_target syzbot
  2023-07-07 10:22 ` syzbot
@ 2023-07-09  2:49 ` syzbot
  1 sibling, 0 replies; 4+ messages in thread
From: syzbot @ 2023-07-09  2:49 UTC (permalink / raw)
  To: anupnewsmail, bongsu.jeon, davem, edumazet, hdanton,
	krzysztof.kozlowski, kuba, linux-kernel, linux-nfc, netdev,
	pabeni, syzkaller-bugs

syzbot has bisected this issue to:

commit e624e6c3e777fb3dfed036b9da4d433aee3608a5
Author: Bongsu Jeon <bongsu.jeon@samsung.com>
Date:   Wed Jan 27 13:08:28 2021 +0000

    nfc: Add a virtual nci device driver

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=12b7b56ca80000
start commit:   a452483508d7 Merge tag 's390-6.5-2' of git://git.kernel.or..
git tree:       upstream
final oops:     https://syzkaller.appspot.com/x/report.txt?x=11b7b56ca80000
console output: https://syzkaller.appspot.com/x/log.txt?x=16b7b56ca80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=7df0cabaf5becfdc
dashboard link: https://syzkaller.appspot.com/bug?extid=0839b78e119aae1fec78
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=123fc664a80000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=12003f4aa80000

Reported-by: syzbot+0839b78e119aae1fec78@syzkaller.appspotmail.com
Fixes: e624e6c3e777 ("nfc: Add a virtual nci device driver")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [syzbot] [nfc?] UBSAN: shift-out-of-bounds in nci_activate_target
       [not found] <20230708025457.1362-1-hdanton@sina.com>
@ 2023-07-08  3:29 ` syzbot
  0 siblings, 0 replies; 4+ messages in thread
From: syzbot @ 2023-07-08  3:29 UTC (permalink / raw)
  To: hdanton, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+0839b78e119aae1fec78@syzkaller.appspotmail.com

Tested on:

commit:         a4524835 Merge tag 's390-6.5-2' of git://git.kernel.or..
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=1406e26ca80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=7df0cabaf5becfdc
dashboard link: https://syzkaller.appspot.com/bug?extid=0839b78e119aae1fec78
compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
patch:          https://syzkaller.appspot.com/x/patch.diff?x=13f3fad2a80000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-09  2:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-02 16:21 [syzbot] [nfc?] UBSAN: shift-out-of-bounds in nci_activate_target syzbot
2023-07-07 10:22 ` syzbot
2023-07-09  2:49 ` syzbot
     [not found] <20230708025457.1362-1-hdanton@sina.com>
2023-07-08  3:29 ` syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).