Skip to content

Commit 986e826

Browse files
committed
scsi: mpi3mr: Fix mpi3mr_host_attrs struct
JIRA: https://issues.redhat.com/browse/RHEL-89712 A NULL termination pointer was removed mistakenly in a previous backport. That causes KASAN to issue BUG warnings like this one: [ 58.960262] BUG: KASAN: global-out-of-bounds in scsi_sysfs_add_host+0x179/0x1b0 [ 58.968701] Read of size 8 at addr ffffffffc069aab8 by task kworker/0:4/355 [ 58.977289] [ 58.985716] CPU: 0 PID: 355 Comm: kworker/0:4 Not tainted 5.14.0-581.el9.x86_64+debug #1 [ 58.994420] Hardware name: Dell Inc. PowerEdge R6615/0WC07M, BIOS 1.9.5 09/12/2024 [ 59.003083] Workqueue: events work_for_cpu_fn [ 59.011505] Call Trace: [ 59.019773] <TASK> [ 59.028130] dump_stack_lvl+0x57/0x81 [ 59.036376] print_address_description.constprop.0+0x8a/0x33b [ 59.044620] print_report+0x125/0x20f [ 59.052913] ? scsi_sysfs_add_host+0x179/0x1b0 [ 59.062740] ? srso_alias_return_thunk+0x5/0xfbef5 [ 59.071541] ? kasan_addr_to_slab+0x9/0xa0 [ 59.080738] ? scsi_sysfs_add_host+0x179/0x1b0 [ 59.089159] kasan_report+0x91/0xc0 [ 59.097749] ? scsi_sysfs_add_host+0x179/0x1b0 [ 59.107107] scsi_sysfs_add_host+0x179/0x1b0 [ 59.116150] scsi_add_host_with_dma.cold+0x6d2/0x6fc [ 59.124572] mpi3mr_probe.part.0.cold+0x8b7/0x998 [mpi3mr] ... Fix it by re-adding the pointer. Upstream Status: RHEL only Signed-off-by: Tomas Henzl <thenzl@redhat.com>
1 parent 7dffc1b commit 986e826

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/scsi/mpi3mr/mpi3mr_app.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3265,6 +3265,7 @@ struct device_attribute *mpi3mr_host_attrs[] = {
32653265
&dev_attr_reply_queue_count,
32663266
&dev_attr_reply_qfull_count,
32673267
&dev_attr_logging_level,
3268+
NULL,
32683269
};
32693270

32703271
/*

0 commit comments

Comments
 (0)