]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: qca: add missing firmware sanity checks
authorJohan Hovold <johan+linaro@kernel.org>
Tue, 30 Apr 2024 17:07:39 +0000 (19:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 May 2024 10:02:37 +0000 (12:02 +0200)
commit427281f9498ed614f9aabc80e46ec077c487da6d
treef2dc3cd1912713786b15155179fe9e14244eb639
parent2d8823700413c36825775f62afcf787e2becf63b
Bluetooth: qca: add missing firmware sanity checks

commit 2e4edfa1e2bd821a317e7d006517dcf2f3fac68d upstream.

Add the missing sanity checks when parsing the firmware files before
downloading them to avoid accessing and corrupting memory beyond the
vmalloced buffer.

Fixes: 83e81961ff7e ("Bluetooth: btqca: Introduce generic QCA ROME support")
Cc: stable@vger.kernel.org # 4.10
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bluetooth/btqca.c