linux/drivers/target
Andrey Vatoropin 5053eab38a scsi: target: Reset t_task_cdb pointer in error case
If allocation of cmd->t_task_cdb fails, it remains NULL but is later
dereferenced in the 'err' path.

In case of error, reset NULL t_task_cdb value to point at the default
fixed-size buffer.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 9e95fb805d ("scsi: target: Fix NULL pointer dereference")
Cc: stable@vger.kernel.org
Signed-off-by: Andrey Vatoropin <a.vatoropin@crpt.ru>
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Link: https://patch.msgid.link/20251118084014.324940-1-a.vatoropin@crpt.ru
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-29 15:06:12 -05:00
..
iscsi scsi: target: iscsi: fix typos and formatting in lio_target messages 2025-09-15 21:54:09 -04:00
loopback scsi: target: tcm_loop: Fix wrong abort tag 2025-03-17 22:04:21 -04:00
sbp scsi: target: sbp: Replace use of system_unbound_wq with system_dfl_wq 2025-11-12 21:28:25 -05:00
tcm_fc scsi: target: Add WQ_PERCPU to alloc_workqueue() users 2025-11-12 21:28:27 -05:00
tcm_remote
Kconfig
Makefile
target_core_alua.c
target_core_alua.h
target_core_configfs.c scsi: target: Simplify target_lu_gp_members_show() 2025-11-02 21:47:29 -05:00
target_core_device.c Merge patch series "target: RW/num_cmds stats improvements" 2025-11-02 22:07:27 -05:00
target_core_fabric_configfs.c scsi: target: Move LUN stats to per-CPU 2025-11-02 22:06:12 -05:00
target_core_fabric_lib.c scsi: target: core: Generate correct identifiers for PR OUT transport IDs 2025-07-24 21:57:00 -04:00
target_core_file.c scsi: target: Rename target_configure_unmap_from_queue() 2025-11-02 21:40:01 -05:00
target_core_file.h
target_core_hba.c
target_core_iblock.c scsi: target: Add atomic support to target_core_iblock 2025-11-02 21:40:02 -05:00
target_core_iblock.h scsi: target: iblock: Allow iblock devices to be shared 2025-07-24 21:39:01 -04:00
target_core_internal.h scsi: target: Move LUN stats to per-CPU 2025-11-02 22:06:12 -05:00
target_core_pr.c SCSI misc on 20250806 2025-08-06 15:44:25 +03:00
target_core_pr.h
target_core_pscsi.c block: add a bio_init_inline helper 2025-09-09 07:31:59 -06:00
target_core_pscsi.h
target_core_rd.c
target_core_rd.h
target_core_sbc.c scsi: target: Add WRITE_ATOMIC_16 handler 2025-11-02 21:40:02 -05:00
target_core_spc.c scsi: target: Add WRITE_ATOMIC_16 support to RSOC 2025-11-02 21:40:02 -05:00
target_core_stat.c scsi: target: Move LUN stats to per-CPU 2025-11-02 22:06:12 -05:00
target_core_tmr.c
target_core_tpg.c scsi: target: Move LUN stats to per-CPU 2025-11-02 22:06:12 -05:00
target_core_transport.c scsi: target: Reset t_task_cdb pointer in error case 2025-11-29 15:06:12 -05:00
target_core_ua.c
target_core_ua.h
target_core_user.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
target_core_xcopy.c scsi: target: Add WQ_PERCPU to alloc_workqueue() users 2025-11-12 21:28:27 -05:00
target_core_xcopy.h