[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <99b0fb1b-37b3-4da4-8129-e502ed8e479a@suse.com>
Date: Mon, 26 Feb 2024 11:59:06 +0100
From: Oliver Neukum <oneukum@...e.com>
To: syzbot <syzbot+28748250ab47a8f04100@...kaller.appspotmail.com>,
bvanassche@....org, emilne@...hat.com, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
martin.petersen@...cle.com, stern@...land.harvard.edu,
syzkaller-bugs@...glegroups.com, tasos@...ossah.com,
usb-storage@...ts.one-eyed-alien.net
Subject: Re: [syzbot] [usb-storage?] divide error in isd200_ata_command
Hi,
On 26.02.24 10:42, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: f2e367d6ad3b Merge tag 'for-6.8/dm-fix-3' of git://git.ker..
> git tree: upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=114e10e4180000
> kernel config: https://syzkaller.appspot.com/x/.config?x=eff9f3183d0a20dd
> dashboard link: https://syzkaller.appspot.com/bug?extid=28748250ab47a8f04100
> 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=1064b372180000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10aca6ac180000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/c55ca1fdc5ad/disk-f2e367d6.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/4556a82fb4ed/vmlinux-f2e367d6.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/95338ed9dad1/bzImage-f2e367d6.xz
>
> The issue was bisected to:
>
> commit 321da3dc1f3c92a12e3c5da934090d2992a8814c
> Author: Martin K. Petersen <martin.petersen@...cle.com>
> Date: Tue Feb 13 14:33:06 2024 +0000
>
> scsi: sd: usb_storage: uas: Access media prior to querying device properties
preliminary analysis:
It oopses here:
} else {
if (!id[ATA_ID_SECTORS] || !id[ATA_ID_HEADS])
goto too_early;
sectnum = (u8)((lba % id[ATA_ID_SECTORS]) + 1);
cylinder = (u16)(lba / (id[ATA_ID_SECTORS] *
id[ATA_ID_HEADS]));
in isd200_scsi_to_ata() because it must not be called before isd200_get_inquiry_data()
has completed.
That raises two questions.
1) should we limit the read_before_ms flag to the cases transparent SCSI is used?
2) does isd200_get_inquiry_data() need to validate what it reads?
Regards
Oliver
Powered by blists - more mailing lists