linux/drivers/nvme/target
YunJe Shin 52a0a98549 nvmet-tcp: add bounds checks in nvmet_tcp_build_pdu_iovec
nvmet_tcp_build_pdu_iovec() could walk past cmd->req.sg when a PDU
length or offset exceeds sg_cnt and then use bogus sg->length/offset
values, leading to _copy_to_iter() GPF/KASAN. Guard sg_idx, remaining
entries, and sg->length/offset before building the bvec.

Fixes: 872d26a391 ("nvmet-tcp: add NVMe over TCP target driver")
Signed-off-by: YunJe Shin <ioerts@kookmin.ac.kr>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Joonkyo Jung <joonkyoj@yonsei.ac.kr>
Signed-off-by: Keith Busch <kbusch@kernel.org>
History 2026-02-05 07:29:10 -08:00
..
admin-cmd.c nvme: fix typo error in nvme target 2025-12-04 14:46:16 -08:00
auth.c nvme updates for Linux 6.19 2025-12-04 20:58:19 -07:00
configfs.c for-6.14/block-20250118 2025-01-20 19:38:46 -08:00
core.c nvme: fix typo error in nvme target 2025-12-04 14:46:16 -08:00
debugfs.c These are objtool fixes and updates by Josh Poimboeuf, centered 2025-04-02 10:30:10 -07:00
debugfs.h nvmet: add debugfs support 2024-06-24 12:53:42 -07:00
discovery.c nvmet: replace strncpy with strscpy 2025-05-20 05:34:25 +02:00
fabrics-cmd-auth.c nvmet-auth: update sc_c in target host hash calculation 2025-11-17 08:05:58 -08:00
fabrics-cmd.c nvmet: fabrics: add CQ init and destroy 2025-05-20 05:34:25 +02:00
fc.c nvmet-fc: use pr_* print macros instead of dev_* 2025-12-04 14:46:13 -08:00
fcloop.c nvmet-fcloop: remove unused lsdir member. 2025-12-04 14:46:11 -08:00
io-cmd-bdev.c nvmet: fix race in nvmet_bio_done() leading to NULL pointer dereference 2026-01-21 07:21:19 -08:00
io-cmd-file.c nvmet: use bvec_set_page to initialize bvecs 2023-02-03 08:20:55 -07:00
Kconfig crash_dump, nvme: select CONFIGFS_FS as built-in 2025-05-27 19:40:33 -07:00
loop.c nvme: remove virtual boundary for sgl capable devices 2025-11-06 18:11:58 -07:00
Makefile nvmet: New NVMe PCI endpoint function target driver 2025-01-10 19:30:49 -08:00
nvmet.h nvme updates for Linux 6.19 2025-12-04 20:58:19 -07:00
passthru.c nvmet: do not copy beyond sybsysnqn string length 2026-01-13 13:50:29 -08:00
pci-epf.c nvmet: pci-epf: fix DMA channel debug print 2025-12-01 13:45:56 -08:00
pr.c nvmet-loop: avoid using mutex in IO hotpath 2024-12-27 13:24:00 -08:00
rdma.c nvmet-rdma: use kvcalloc for commands and responses arrays 2025-12-04 14:46:16 -08:00
tcp.c nvmet-tcp: add bounds checks in nvmet_tcp_build_pdu_iovec 2026-02-05 07:29:10 -08:00
trace.c nvmet: add tracing of reservation commands 2024-11-13 08:51:24 -08:00
trace.h nvme: trace: avoid memcpy overflow warning 2024-01-05 13:16:18 -08:00
zns.c nvme: fix multiple spelling and grammar issues in host drivers 2025-07-17 13:38:06 +02:00