mirror-linux/drivers/scsi/libfc
Dan Carpenter 120642726e scsi: libfc: Prevent integer overflow in fc_fcp_recv_data()
The "offset" comes from the skb->data that we received.  Here the code
is verifying that "offset + len" is within bounds however it does not
take integer overflows into account.  Use size_add() to be safe.

This would only be an issue on 32bit systems which are probably a very
small percent of the users.  Still, it's worth fixing just for
correctness sake.

Fixes: 42e9a92fe6 ("[SCSI] libfc: A modular Fibre Channel library")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Message-Id: <aNvPMet7TPtM9CY1@stanley.mountain>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-10-06 22:27:28 -04:00
..
Makefile
fc_disc.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
fc_elsct.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
fc_encode.h scsi: libfc: Fix potential buffer overflow in fc_ct_ms_fill() 2025-09-24 21:57:03 -04:00
fc_exch.c scsi: Expand all create*_workqueue() invocations 2024-08-22 21:28:55 -04:00
fc_fcp.c scsi: libfc: Prevent integer overflow in fc_fcp_recv_data() 2025-10-06 22:27:28 -04:00
fc_frame.c
fc_libfc.c
fc_libfc.h
fc_lport.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
fc_npiv.c
fc_rport.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00