mirror-linux/drivers/base/firmware_loader
Gaosheng Cui 369a9c046c firmware_loader: Fix possible resource leak in fw_log_firmware_info()
The alg instance should be released under the exception path, otherwise
there may be resource leak here.

To mitigate this, free the alg instance with crypto_free_shash when kmalloc
fails.

Fixes: 02fe26f253 ("firmware_loader: Add debug message with checksum for FW file")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Russ Weight <russ.weight@linux.dev>
Link: https://lore.kernel.org/r/20241016110335.3677924-1-cuigaosheng1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-13 07:13:50 +01:00
..
builtin kbuild: do not quote string values in include/config/auto.conf 2022-01-08 18:03:57 +09:00
Kconfig rust: add firmware abstractions 2024-06-18 18:45:12 +02:00
Makefile firmware_loader: Add firmware-upload support 2022-04-26 12:34:28 +02:00
fallback.c firmware_loader: Abort all upcoming firmware load request once reboot triggered 2023-10-27 13:30:38 +02:00
fallback.h firmware_loader: Refactor kill_pending_fw_fallback_reqs() 2023-10-27 13:30:38 +02:00
fallback_platform.c firmware: Store opt_flags in fw_priv 2020-10-05 13:37:04 +02:00
fallback_table.c fw loader: Remove the now superfluous sentinel element from ctl_table array 2023-10-11 12:16:13 -07:00
firmware.h firmware_loader: Abort all upcoming firmware load request once reboot triggered 2023-10-27 13:30:38 +02:00
main.c firmware_loader: Fix possible resource leak in fw_log_firmware_info() 2024-11-13 07:13:50 +01:00
sysfs.c driver core: class: mark the struct class for sysfs callbacks as constant 2023-03-29 07:54:58 +02:00
sysfs.h firmware_loader: fix up to_fw_sysfs() to preserve const 2022-12-06 16:55:25 +01:00
sysfs_upload.c firmware_loader: Expand Firmware upload error codes with firmware invalid error 2023-11-24 18:09:19 -08:00
sysfs_upload.h firmware_loader: Move definitions from sysfs_upload.h to sysfs.h 2022-04-29 16:49:44 +02:00