diff --git a/patches.suse/scsi-smartpqi-Replace-one-element-array-with-flexibl-ead82126.patch b/patches.suse/scsi-smartpqi-Replace-one-element-array-with-flexibl-ead82126.patch new file mode 100644 index 0000000..bc381d7 --- /dev/null +++ b/patches.suse/scsi-smartpqi-Replace-one-element-array-with-flexibl-ead82126.patch @@ -0,0 +1,50 @@ +From: "Gustavo A. R. Silva" +Date: Tue, 7 Feb 2023 15:59:43 -0600 +Subject: scsi: smartpqi: Replace one-element array with flexible-array member +Patch-mainline: v6.3-rc1 +Git-commit: ead821268c14a8f87b5cb1079aed10bb16373fe8 +References: bsc#1207315 + +One-element arrays are deprecated, and we are replacing them with flexible +array members instead. So, replace one-element array with flexible-array +member in struct report_log_lun_list. + +This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines +on memcpy(). + +Link: https://lore.kernel.org/r/Y+LJz/r6+UeLqnV3@work +Link: https://github.com/KSPP/linux/issues/79 +Link: https://github.com/KSPP/linux/issues/204 +Signed-off-by: Gustavo A. R. Silva +Acked-by: Don Brace +Reviewed-by: Kees Cook +Signed-off-by: Martin K. Petersen +Acked-by: Martin Wilck +--- + drivers/scsi/smartpqi/smartpqi.h | 2 +- + drivers/scsi/smartpqi/smartpqi_init.c | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/scsi/smartpqi/smartpqi.h ++++ b/drivers/scsi/smartpqi/smartpqi.h +@@ -954,7 +954,7 @@ struct report_log_lun { + + struct report_log_lun_list { + struct report_lun_header header; +- struct report_log_lun lun_entries[1]; ++ struct report_log_lun lun_entries[]; + }; + + struct report_phys_lun_8byte_wwid { +--- a/drivers/scsi/smartpqi/smartpqi_init.c ++++ b/drivers/scsi/smartpqi/smartpqi_init.c +@@ -1259,7 +1259,8 @@ static int pqi_get_device_lists(struct p + "report logical LUNs failed\n"); + + /* +- * Tack the controller itself onto the end of the logical device list. ++ * Tack the controller itself onto the end of the logical device list ++ * by adding a list entry that is all zeros. + */ + + logdev_data = *logdev_list; diff --git a/series.conf b/series.conf index 653dd41..52bd0a2 100644 --- a/series.conf +++ b/series.conf @@ -36907,6 +36907,7 @@ patches.suse/ipmi_ssif-Rename-idle-state-and-check.patch patches.suse/ipmi-ssif-Remove-rtc_us_timer.patch patches.suse/ipmi-ssif-Add-a-timer-between-request-retries.patch + patches.suse/scsi-smartpqi-Replace-one-element-array-with-flexibl-ead82126.patch patches.suse/mm-memcontrol-deprecate-charge-moving.patch patches.suse/ibmvnic-Assign-XPS-map-to-correct-queue-index.patch patches.suse/0001-net-tls-fix-possible-race-condition-between-do_tls_g.patch