Bluetooth: bnep: Fix out-of-bound access
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 28 Feb 2024 17:11:08 +0000 (12:11 -0500)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 6 Mar 2024 22:26:24 +0000 (17:26 -0500)
commit0f0639b4d6f649338ce29c62da3ec0787fa08cd1
tree7112c3c4b2bb86ff81b62394414884a5adb84f96
parent79f4127a502c5905f04da1f20a7bbe07103fb77c
Bluetooth: bnep: Fix out-of-bound access

This fixes attempting to access past ethhdr.h_source, although it seems
intentional to copy also the contents of h_proto this triggers
out-of-bound access problems with the likes of static analyzer, so this
instead just copy ETH_ALEN and then proceed to use put_unaligned to copy
h_proto separetely.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/bnep/core.c