All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+270f1c719ee7baab9941@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
	 xandfury@gmail.com
Subject: Re: [syzbot] [scsi?] UBSAN: shift-out-of-bounds in sg_build_indirect
Date: Sat, 27 Sep 2025 21:14:02 -0700	[thread overview]
Message-ID: <68d8b60a.050a0220.25d7ab.046f.GAE@google.com> (raw)
In-Reply-To: <87jz1j2pq0.fsf@gmail.com>

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
UBSAN: shift-out-of-bounds in sg_build_indirect

------------[ cut here ]------------
UBSAN: shift-out-of-bounds in drivers/scsi/sg.c:1896:13
shift exponent 64 is too large for 32-bit type 'int'
CPU: 0 UID: 0 PID: 6529 Comm: syz.0.16 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120
 ubsan_epilogue lib/ubsan.c:233 [inline]
 __ubsan_handle_shift_out_of_bounds+0x27f/0x420 lib/ubsan.c:494
 sg_build_indirect.cold+0x1b/0x20 drivers/scsi/sg.c:1896
 sg_build_reserve+0xc4/0x180 drivers/scsi/sg.c:2006
 sg_add_sfp drivers/scsi/sg.c:2188 [inline]
 sg_open+0xc88/0x1a10 drivers/scsi/sg.c:348
 chrdev_open+0x234/0x6a0 fs/char_dev.c:414
 do_dentry_open+0x97f/0x1530 fs/open.c:965
 vfs_open+0x82/0x3f0 fs/open.c:1095
 do_open fs/namei.c:3887 [inline]
 path_openat+0x1de4/0x2cb0 fs/namei.c:4046
 do_filp_open+0x20b/0x470 fs/namei.c:4073
 do_sys_openat2+0x11b/0x1d0 fs/open.c:1435
 do_sys_open fs/open.c:1450 [inline]
 __do_sys_openat fs/open.c:1466 [inline]
 __se_sys_openat fs/open.c:1461 [inline]
 __x64_sys_openat+0x174/0x210 fs/open.c:1461
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0x4e0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fac63f8cde9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fac64de2038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fac641a5fa0 RCX: 00007fac63f8cde9
RDX: 000000000008a002 RSI: 00004000000000c0 RDI: ffffffffffffff9c
RBP: 00007fac6400e2a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fac641a5fa0 R15: 00007ffc0932dc28
 </TASK>
---[ end trace ]---


Tested on:

commit:         51a24b7d Merge tag 'trace-tools-v6.17-rc5' of git://gi..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1203df12580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=c0765aa9a4a8b6b6
dashboard link: https://syzkaller.appspot.com/bug?extid=270f1c719ee7baab9941
compiler:       gcc (Debian 12.2.0-14+deb12u1) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40

Note: no patches were applied.

       reply	other threads:[~2025-09-28  4:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87jz1j2pq0.fsf@gmail.com>
2025-09-28  4:14 ` syzbot [this message]
     [not found] <CAJ9gUkHp+QqiOB+Aegm7Fz01ufDsLseO4VP0TVz3SWWkFSrOwQ@mail.gmail.com>
2025-11-07 18:24 ` [syzbot] [scsi?] UBSAN: shift-out-of-bounds in sg_build_indirect syzbot
     [not found] <CAJ9gUkF9p18DjsCWf6yatsv5jstKbUx_PcqdgKaHk1bs5XxfKA@mail.gmail.com>
2025-11-07 17:36 ` syzbot
     [not found] <CAJ9gUkG=mei=vpbw11vK_UA6yor20N17x2syzCvtpQc9rCVa5Q@mail.gmail.com>
2025-10-10 11:51 ` syzbot
     [not found] <CAJ9gUkF5H81CWD434JaxVb1+6E=hmBfOq9dqb7wubyU39Bsdag@mail.gmail.com>
2025-10-06 13:56 ` syzbot
2025-02-14 19:58 syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=68d8b60a.050a0220.25d7ab.046f.GAE@google.com \
    --to=syzbot+270f1c719ee7baab9941@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=xandfury@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.