linux-stable/drivers
Quinn Tran 1fc94de1c1 scsi: qla2xxx: Fix system crash due to bad pointer access
commit 19597cad64 upstream.

User experiences system crash when running AER error injection.  The
perturbation causes the abort-all-I/O path to trigger. The driver assumes
all I/O on this path is FCP only. If there is both NVMe & FCP traffic, a
system crash happens. Add additional check to see if I/O is FCP or not
before access.

PID: 999019  TASK: ff35d769f24722c0  CPU: 53  COMMAND: "kworker/53:1"
 0 [ff3f78b964847b58] machine_kexec at ffffffffae86973d
 1 [ff3f78b964847ba8] __crash_kexec at ffffffffae9be29d
 2 [ff3f78b964847c70] crash_kexec at ffffffffae9bf528
 3 [ff3f78b964847c78] oops_end at ffffffffae8282ab
 4 [ff3f78b964847c98] exc_page_fault at ffffffffaf2da502
 5 [ff3f78b964847cc0] asm_exc_page_fault at ffffffffaf400b62
   [exception RIP: qla2x00_abort_srb+444]
   RIP: ffffffffc07b5f8c  RSP: ff3f78b964847d78  RFLAGS: 00010046
   RAX: 0000000000000282  RBX: ff35d74a0195a200  RCX: ff35d76886fd03a0
   RDX: 0000000000000001  RSI: ffffffffc07c5ec8  RDI: ff35d74a0195a200
   RBP: ff35d76913d22080   R8: ff35d7694d103200   R9: ff35d7694d103200
   R10: 0000000100000000  R11: ffffffffb05d6630  R12: 0000000000010000
   R13: ff3f78b964847df8  R14: ff35d768d8754000  R15: ff35d768877248e0
   ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
 6 [ff3f78b964847d70] qla2x00_abort_srb at ffffffffc07b5f84 [qla2xxx]
 7 [ff3f78b964847de0] __qla2x00_abort_all_cmds at ffffffffc07b6238 [qla2xxx]
 8 [ff3f78b964847e38] qla2x00_abort_all_cmds at ffffffffc07ba635 [qla2xxx]
 9 [ff3f78b964847e58] qla2x00_terminate_rport_io at ffffffffc08145eb [qla2xxx]
10 [ff3f78b964847e70] fc_terminate_rport_io at ffffffffc045987e [scsi_transport_fc]
11 [ff3f78b964847e88] process_one_work at ffffffffae914f15
12 [ff3f78b964847ed0] worker_thread at ffffffffae9154c0
13 [ff3f78b964847f10] kthread at ffffffffae91c456
14 [ff3f78b964847f50] ret_from_fork at ffffffffae8036ef

Cc: stable@vger.kernel.org
Fixes: f45bca8c50 ("scsi: qla2xxx: Fix double scsi_done for abort path")
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20231030064912.37912-1-njavali@marvell.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-28 17:07:07 +00:00
..
accessibility
acpi ACPI: EC: Add quirk for HP 250 G7 Notebook PC 2023-11-28 17:06:56 +00:00
amba amba: bus: fix refcount leak 2023-09-13 09:42:56 +02:00
android
ata scsi: sd: Introduce manage_shutdown device flag 2023-11-02 09:35:29 +01:00
atm atm: iphase: Do PCI error checks on own line 2023-11-28 17:07:00 +00:00
auxdisplay
base regmap: prevent noinc writes from clobbering cache 2023-11-20 11:52:15 +01:00
bcma
block virtio-blk: fix implicit overflow on virtio_max_dma_size 2023-11-28 17:07:02 +00:00
bluetooth Bluetooth: btusb: Add date->evt_skb is NULL check 2023-11-28 17:06:56 +00:00
bus bus: ti-sysc: Fix SYSC_QUIRK_SWSUP_SIDLE_ACT handling for uart wake-up 2023-10-06 14:56:48 +02:00
cdrom
char hwrng: geode - fix accessing registers 2023-11-20 11:52:04 +01:00
clk clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped 2023-11-20 11:52:03 +01:00
clocksource clocksource/drivers/timer-atmel-tcb: Fix initialization on SAM9 hardware 2023-11-28 17:06:55 +00:00
comedi
connector
counter counter: microchip-tcb-capture: Fix the use of internal GCLK logic 2023-10-19 23:08:58 +02:00
cpufreq cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug 2023-09-13 09:43:04 +02:00
cpuidle
crypto crypto: hisilicon/qm - prevent soft lockup in receive loop 2023-11-28 17:07:00 +00:00
cxl cxl/mem: Fix shutdown order 2023-11-20 11:52:13 +01:00
dax
dca
devfreq PM / devfreq: rockchip-dfi: Make pmu regmap mandatory 2023-11-20 11:51:54 +01:00
dio
dma dmaengine: pxa_dma: Remove an erroneous BUG_ON() in pxad_free_desc() 2023-11-20 11:52:10 +01:00
dma-buf dma-buf: add dma_fence_timestamp helper 2023-10-19 23:08:57 +02:00
edac
eisa
extcon extcon: cht_wc: add POWER_SUPPLY dependency 2023-09-13 09:42:53 +02:00
firewire scsi: sd: Introduce manage_shutdown device flag 2023-11-02 09:35:29 +01:00
firmware firmware: arm_ffa: Allow the FF-A drivers to use 32bit mode of messaging 2023-11-20 11:52:03 +01:00
fpga
fsi fsi: aspeed: Reset master errors after CFAM reset 2023-09-13 09:42:54 +02:00
gnss
gpio gpio: vf610: mask the gpio irq in system suspend and support wakeup 2023-10-25 12:03:16 +02:00
gpu i915/perf: Fix NULL deref bugs with drm_dbg() calls 2023-11-28 17:07:07 +00:00
greybus
hid HID: Add quirk for Dell Pro Wireless Keyboard and Mouse KM5221W 2023-11-28 17:07:00 +00:00
hsi
hte hte: tegra: Fix missing error code in tegra_hte_test_probe() 2023-11-20 11:51:58 +01:00
hv Drivers: hv: vmbus: Don't dereference ACPI root object handle 2023-09-13 09:42:59 +02:00
hwmon hwmon: (sch5627) Disallow write access if virtual registers are locked 2023-11-20 11:51:58 +01:00
hwspinlock hwspinlock: qcom: add missing regmap config for SFPB MMIO implementation 2023-09-19 12:28:05 +02:00
hwtracing coresight: tmc-etr: Disable warnings for allocation failures 2023-11-08 14:10:57 +01:00
i2c i2c: dev: copy userspace array safely 2023-11-28 17:07:02 +00:00
i3c i3c: master: mipi-i3c-hci: Fix a kernel panic for accessing DAT_data. 2023-11-28 17:07:02 +00:00
idle intel_idle: add Emerald Rapids Xeon support 2023-10-10 22:00:44 +02:00
iio iio: adc: stm32-adc: harden against NULL pointer deref in stm32_adc_probe() 2023-11-28 17:07:01 +00:00
infiniband RDMA/hfi1: Use FIELD_GET() to extract Link Width 2023-11-28 17:06:59 +00:00
input Input: synaptics-rmi4 - fix use after free in rmi_unregister_function() 2023-11-20 11:52:15 +01:00
interconnect interconnect: qcom: sm8350: Set ACV enable_mask 2023-11-20 11:52:12 +01:00
iommu iommu/mediatek: Fix share pgtable for iova over 4GB 2023-10-10 22:00:41 +02:00
ipack
irqchip irqchip/stm32-exti: add missing DT IRQ flag translation 2023-11-08 14:10:57 +01:00
isdn
leds leds: trigger: ledtrig-cpu:: Fix 'output may be truncated' issue for 'cpu' 2023-11-20 11:52:08 +01:00
macintosh
mailbox mailbox: qcom-ipcc: fix incorrect num_chans counting 2023-09-19 12:27:58 +02:00
mcb mcb-lpc: Reallocate memory region to avoid memory overlapping 2023-11-02 09:35:22 +01:00
md dm zoned: free dmz->ddev array in dmz_put_zoned_devices 2023-10-10 22:00:44 +02:00
media media: venus: hfi: add checks to perform sanity on queue pointers 2023-11-28 17:07:07 +00:00
memory
memstick
message
mfd mfd: intel-lpss: Add Intel Lunar Lake-M PCI IDs 2023-11-28 17:07:01 +00:00
misc misc: pci_endpoint_test: Add Device ID for R-Car S4-8 PCIe controller 2023-11-28 17:07:00 +00:00
mmc Revert "mmc: core: Capture correct oemid-bits for eMMC cards" 2023-11-20 11:52:18 +01:00
most
mtd mtd: rawnand: meson: check return value of devm_kasprintf() 2023-11-28 17:07:03 +00:00
mux
net macvlan: Don't propagate promisc change to lower dev in passthru 2023-11-28 17:07:06 +00:00
nfc
ntb ntb: Fix calculation ntb_transport_tx_free_entry() 2023-09-13 09:43:02 +02:00
nubus
nvdimm nd_btt: Make BTT lanes preemptible 2023-11-20 11:52:05 +01:00
nvme nvme: fix error-handling for io_uring nvme-passthrough 2023-11-20 11:52:17 +01:00
nvmem nvmem: imx: correct nregs for i.MX6UL 2023-11-02 09:35:31 +01:00
of of: dynamic: Fix potential memory leak in of_changeset_action() 2023-10-10 22:00:44 +02:00
opp
parisc parisc: iosapic.c: Fix sparse warnings 2023-10-06 14:56:51 +02:00
parport
pci PCI: Use FIELD_GET() in Sapphire RX 5600 XT Pulse quirk 2023-11-28 17:07:00 +00:00
pcmcia pcmcia: ds: fix possible name leak in error path in pcmcia_device_add() 2023-11-20 11:52:13 +01:00
peci
perf perf: hisi: Fix use-after-free when register pmu fails 2023-11-20 11:52:01 +01:00
phy phy: mapphone-mdm6600: Fix pinctrl_pm handling for sleep pins 2023-10-25 12:03:16 +02:00
pinctrl pinctrl: renesas: rzg2l: Make reverse order of enable() for disable() 2023-11-20 11:52:10 +01:00
platform platform/x86: thinkpad_acpi: Add battery quirk for Thinkpad X120e 2023-11-28 17:06:56 +00:00
pnp
power power: supply: core: Use blocking_notifier_call_chain to avoid RCU complaint 2023-11-08 14:11:02 +01:00
powercap
pps
ps3
ptp ptp: annotate data-race around q->head and q->tail 2023-11-28 17:07:05 +00:00
pwm pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume 2023-11-20 11:52:15 +01:00
rapidio
ras
regulator regulator: mt6358: Fail probe on unknown chip ID 2023-11-20 11:51:56 +01:00
remoteproc
reset
rpmsg rpmsg: glink: Add check for kstrdup 2023-09-13 09:42:58 +02:00
rtc rtc: pcf85363: fix wrong mask/val parameters in regmap_update_bits call 2023-11-20 11:52:13 +01:00
s390 s390/cio: fix a memleak in css_alloc_subchannel 2023-10-25 12:03:15 +02:00
sbus
scsi scsi: qla2xxx: Fix system crash due to bad pointer access 2023-11-28 17:07:07 +00:00
sh
siox
slimbus
soc soc: qcom: llcc: Handle a second device without data corruption 2023-11-20 11:52:02 +01:00
soundwire soundwire: dmi-quirks: update HP Omen match 2023-11-28 17:07:01 +00:00
spi spi: spi-zynq-qspi: add spi-mem to driver kconfig dependencies 2023-11-20 11:52:18 +01:00
spmi
ssb
staging media: cedrus: Fix clock/reset sequence 2023-11-20 11:52:14 +01:00
target scsi: target: core: Fix deadlock due to recursive locking 2023-10-10 22:00:41 +02:00
tc
tee tee: amdtee: fix use-after-free vulnerability in amdtee_close_session 2023-10-19 23:08:57 +02:00
thermal thermal: core: prevent potential string overflow 2023-11-20 11:51:54 +01:00
thunderbolt thunderbolt: Apply USB 3.x bandwidth quirk only in software connection manager 2023-11-28 17:07:01 +00:00
tty tty: vcc: Add check for kstrdup() in vcc_probe() 2023-11-28 17:07:01 +00:00
ufs scsi: ufs: core: Leave space for '\0' in utf8 desc string 2023-11-20 11:52:07 +01:00
uio
usb usb: gadget: f_ncm: Always set current gadget in ncm_bind() 2023-11-28 17:07:01 +00:00
vdpa
vfio vfio/mdev: Fix a null-ptr-deref bug for mdev_unregister_parent() 2023-10-06 14:56:45 +02:00
vhost vhost-vdpa: fix use after free in vhost_vdpa_probe() 2023-11-28 17:07:04 +00:00
video fbdev: fsl-diu-fb: mark wr_reg_wa() static 2023-11-20 11:52:18 +01:00
virt virt: sevguest: Fix passing a stack buffer as a scatterlist target 2023-11-20 11:52:13 +01:00
virtio virtio_pci: fix the common cfg map size 2023-11-02 09:35:23 +01:00
vlynq
w1
watchdog watchdog: ixp4xx: Make sure restart always works 2023-11-20 11:52:15 +01:00
xen xen/events: fix delayed eoi list handling 2023-11-28 17:07:05 +00:00
zorro
Kconfig
Makefile