diff options
| author | Dan Carpenter <dan.carpenter@linaro.org> | 2025-04-02 14:01:41 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-05-02 07:44:09 +0200 |
| commit | 2d7c60c2a38b4b461fa960ad0995136a6bfe0756 (patch) | |
| tree | 28e1dc8f0cb827f58493c275ef020a2dfd0ee08d /net | |
| parent | 056f04935bd821ef3c769e537d6fd4ea7f56ce9f (diff) | |
| download | linux-2d7c60c2a38b4b461fa960ad0995136a6bfe0756.tar.gz linux-2d7c60c2a38b4b461fa960ad0995136a6bfe0756.tar.bz2 linux-2d7c60c2a38b4b461fa960ad0995136a6bfe0756.zip | |
Bluetooth: btrtl: Prevent potential NULL dereference
[ Upstream commit 324dddea321078a6eeb535c2bff5257be74c9799 ]
The btrtl_initialize() function checks that rtl_load_file() either
had an error or it loaded a zero length file. However, if it loaded
a zero length file then the error code is not set correctly. It
results in an error pointer vs NULL bug, followed by a NULL pointer
dereference. This was detected by Smatch:
drivers/bluetooth/btrtl.c:592 btrtl_initialize() warn: passing zero to 'ERR_PTR'
Fixes: 26503ad25de8 ("Bluetooth: btrtl: split the device initialization into smaller parts")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions
