Bug 120371 - UBSAN splat in drivers/scsi/scsi_devinfo.c:458:21
Summary: UBSAN splat in drivers/scsi/scsi_devinfo.c:458:21
Status: CLOSED CODE_FIX
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: SCSI (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: linux-scsi@vger.kernel.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-15 12:33 UTC by Wilfried Klaebe
Modified: 2017-02-25 09:31 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.7.0-rc3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
.config (124.93 KB, application/octet-stream)
2016-06-15 12:33 UTC, Wilfried Klaebe
Details

Description Wilfried Klaebe 2016-06-15 12:33:36 UTC
Created attachment 220111 [details]
.config

While booting, UBSAN reports an index out of range use in drivers/scsi/scsi_devinfo.c:458:21:

[    2.226941] ================================================================================
[    2.226944] UBSAN: Undefined behaviour in /usr/local/src/kernel/linux-git/drivers/scsi/scsi_devinfo.c:458:21
[    2.226945] index 8 is out of range for type 'char [8]'
[    2.226948] CPU: 3 PID: 6 Comm: kworker/u16:0 Not tainted 4.7.0-rc3-00002-g44c5afa #1
[    2.226948] Hardware name: Apple Inc. MacBookPro8,2/Mac-94245A3940C91C80, BIOS    MBP81.88Z.0047.B27.1201241646 01/24/12
[    2.226955] Workqueue: events_unbound async_run_entry_fn
[    2.226958]  000000000000000e ffff88026614fa50 ffffffff815c8665 ffffffff81190e52
[    2.226961]  ffff88026614fa78 0000000000000008 ffff88026614fa68 ffffffff8163e77d
[    2.226963]  ffffffff8263a560 ffff88026614fac0 ffffffff8163ee95 0000000000000286
[    2.226963] Call Trace:
[    2.226968]  [<ffffffff815c8665>] dump_stack+0x68/0xa3
[    2.226971]  [<ffffffff81190e52>] ? down_trylock+0x32/0x60
[    2.226975]  [<ffffffff8163e77d>] ubsan_epilogue+0xd/0x40
[    2.226978]  [<ffffffff8163ee95>] __ubsan_handle_out_of_bounds+0x75/0xa0
[    2.226980]  [<ffffffff8119758d>] ? trace_hardirqs_on+0xd/0x10
[    2.226984]  [<ffffffff817ccf49>] scsi_dev_info_list_find+0x279/0x2b0
[    2.226986]  [<ffffffff817cd49c>] scsi_get_device_flags_keyed+0x1c/0x80
[    2.226989]  [<ffffffff817cd50b>] scsi_get_device_flags+0xb/0x10
[    2.226991]  [<ffffffff817c6a79>] scsi_probe_and_add_lun+0x4b9/0x1200
[    2.226993]  [<ffffffff817c7fdb>] __scsi_add_device+0x11b/0x140
[    2.226996]  [<ffffffff817f920b>] ata_scsi_scan_host+0x10b/0x200
[    2.226999]  [<ffffffff817eefb5>] async_port_probe+0x45/0x80
[    2.227001]  [<ffffffff8114b052>] async_run_entry_fn+0x52/0x220
[    2.227003]  [<ffffffff8113b4a3>] process_one_work+0x273/0x8d0
[    2.227005]  [<ffffffff8113b43f>] ? process_one_work+0x20f/0x8d0
[    2.227007]  [<ffffffff8113bd0d>] worker_thread+0x20d/0x7e0
[    2.227009]  [<ffffffff8113bb00>] ? process_one_work+0x8d0/0x8d0
[    2.227011]  [<ffffffff81146dfd>] kthread+0x13d/0x1a0
[    2.227016]  [<ffffffff81b3232f>] ret_from_fork+0x1f/0x40
[    2.227018]  [<ffffffff81146cc0>] ? kthread_create_on_node+0x260/0x260
[    2.227019] ================================================================================
Comment 1 Navin 2016-07-19 09:54:02 UTC
This is fixed by commit 5e7ff2ca7f2da55fe777167849d0c93403bd0dc8
Comment 2 Wilfried Klaebe 2017-02-22 20:06:03 UTC
does not appear anymore in (at least) 4.10

Note You need to log in before you can comment on or make changes to this bug.