Files
u-boot/drivers
Mattijs Korpershoek 6c9eaec55a usb: gadget: f_mass_storage: Fix NULL dereference in fsg_add()
fsg_common_init() can fail when memory is low. In that case, it returns
PTR_ERR().
fsg_add() does not check for failure, and thus dereferences an invalid
fsg_common later, which crashes.

Verify if we receive an error from fsg_common_init() and handle it
gracefully.

Reported-by: Zixun LI <admin@hifiphile.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Zixun LI <admin@hifiphile.com> # on SAM9X60
Link: https://lore.kernel.org/r/20250328-ums-gadget-leak-v1-3-3b677db99bde@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-04-10 10:00:24 +02:00
..
2025-04-08 16:23:27 -06:00
2024-10-11 11:44:48 -06:00
2025-04-08 11:43:23 -06:00
2024-11-20 17:57:58 +01:00
2024-10-11 11:44:48 -06:00
2025-03-04 12:07:23 -06:00
2025-04-08 11:43:23 -06:00
2025-03-27 00:26:35 +00:00
2025-03-19 03:36:19 +01:00
2024-04-26 08:28:35 +03:00
2025-02-11 20:10:58 -06:00
2025-02-18 08:26:43 -06:00