2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/scsi/elx
Vitaliy Shevtsov 2a8a5a5dd0 scsi: elx: efct: Fix memory leak in efct_hw_parse_filter()
strsep() modifies the address of the pointer passed to it so that it no
longer points to the original address. This means kfree() gets the wrong
pointer.

Fix this by passing unmodified pointer returned from kstrdup() to
kfree().

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

Fixes: 4df84e8466 ("scsi: elx: efct: Driver initialization routines")
Signed-off-by: Vitaliy Shevtsov <v.shevtsov@mt-integration.ru>
Link: https://lore.kernel.org/r/20250612163616.24298-1-v.shevtsov@mt-integration.ru
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-06-16 17:52:05 -04:00
..
efct scsi: elx: efct: Fix memory leak in efct_hw_parse_filter() 2025-06-16 17:52:05 -04:00
include scsi: elx: libefc_sli: Queue create/destroy/parse routines 2021-06-15 23:39:29 -04:00
libefc treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
libefc_sli scsi: elx: sli4: Replace deprecated strncpy() with strscpy() 2025-04-11 21:28:16 -04:00
Kconfig scsi: elx: efct: Add Makefile and Kconfig for efct driver 2021-06-15 23:39:33 -04:00
Makefile scsi: elx: efct: Add Makefile and Kconfig for efct driver 2021-06-15 23:39:33 -04:00