]> git.ipfire.org Git - thirdparty/linux.git/commit
Bluetooth: Add check for mgmt_alloc_skb() in mgmt_device_connected()
authorHaoxiang Li <haoxiang_li2024@163.com>
Fri, 21 Feb 2025 08:58:01 +0000 (16:58 +0800)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 27 Feb 2025 21:50:30 +0000 (16:50 -0500)
commitd8df010f72b8a32aaea393e36121738bb53ed905
tree6ea191ed2af4ba264d064f4984737b01c7c8450c
parentf2176a07e7b19f73e05c805cf3d130a2999154cb
Bluetooth: Add check for mgmt_alloc_skb() in mgmt_device_connected()

Add check for the return value of mgmt_alloc_skb() in
mgmt_device_connected() to prevent null pointer dereference.

Fixes: e96741437ef0 ("Bluetooth: mgmt: Make use of mgmt_send_event_skb in MGMT_EV_DEVICE_CONNECTED")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/mgmt.c