linux/net/bluetooth
Ye Bin 64a90991ba Bluetooth: bnep: fix wild-memory-access in proto_unregister
There's issue as follows:
  KASAN: maybe wild-memory-access in range [0xdead...108-0xdead...10f]
  CPU: 3 UID: 0 PID: 2805 Comm: rmmod Tainted: G        W
  RIP: 0010:proto_unregister+0xee/0x400
  Call Trace:
   <TASK>
   __do_sys_delete_module+0x318/0x580
   do_syscall_64+0xc1/0x1d0
   entry_SYSCALL_64_after_hwframe+0x77/0x7f

As bnep_init() ignore bnep_sock_init()'s return value, and bnep_sock_init()
will cleanup all resource. Then when remove bnep module will call
bnep_sock_cleanup() to cleanup sock's resource.
To solve above issue just return bnep_sock_init()'s return value in
bnep_exit().

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Ye Bin <yebin10@huawei.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2024-10-16 16:10:03 -04:00
..
bnep Bluetooth: bnep: fix wild-memory-access in proto_unregister 2024-10-16 16:10:03 -04:00
cmtp Bluetooth: CMTP: Mark BT_CMTP as DEPRECATED 2024-09-10 13:07:08 -04:00
hidp Bluetooth: Init sk_peer_* on bt_sock_alloc 2023-08-11 11:37:22 -07:00
rfcomm Bluetooth: RFCOMM: FIX possible deadlock in rfcomm_sk_state_change 2024-10-04 16:54:10 -04:00
6lowpan.c ipv6: introduce dst_rt6_info() helper 2024-04-29 13:32:01 +01:00
af_bluetooth.c Bluetooth: Remove debugfs directory on module init failure 2024-10-16 16:09:25 -04:00
aosp.c Bluetooth: Fix null pointer deref on unexpected status event 2022-08-08 17:04:37 -07:00
aosp.h Bluetooth: aosp: Support AOSP Bluetooth Quality Report 2021-11-02 19:37:52 +01:00
coredump.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
ecdh_helper.c Bluetooth: Use crypto_wait_req 2023-02-13 18:34:48 +08:00
ecdh_helper.h Fix misc new gcc warnings 2021-04-27 17:05:53 -07:00
eir.c Bluetooth: Fix eir name length 2024-03-08 10:22:17 -05:00
eir.h move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hci_codec.c Bluetooth: Fix support for Read Local Supported Codecs V2 2022-12-02 13:09:31 -08:00
hci_codec.h Bluetooth: Add support for Read Local Supported Codecs V2 2021-09-07 14:09:18 -07:00
hci_conn.c Bluetooth: hci_conn: Fix UAF in hci_enhanced_setup_sync 2024-10-04 16:54:17 -04:00
hci_core.c Including fixes from ieee802154, bluetooth and netfilter. 2024-10-03 09:44:00 -07:00
hci_debugfs.c Bluetooth: Remove hci_request.{c,h} 2024-07-15 10:11:35 -04:00
hci_debugfs.h Bluetooth: hci_core: Move all debugfs handling to hci_debugfs.c 2021-09-22 16:17:13 +02:00
hci_event.c Including fixes from ieee802154, bluetooth and netfilter. 2024-10-03 09:44:00 -07:00
hci_sock.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hci_sync.c Bluetooth: hci_sync: Ignore errors from HCI_OP_REMOTE_NAME_REQ_CANCEL 2024-09-10 13:07:24 -04:00
hci_sysfs.c Bluetooth: Fix double free in hci_conn_cleanup 2023-10-23 11:05:11 -07:00
iso.c Bluetooth: ISO: Fix multiple init when debugfs is disabled 2024-10-16 16:08:43 -04:00
Kconfig Bluetooth: Remove BT_HS 2024-03-06 17:22:39 -05:00
l2cap_core.c Bluetooth: L2CAP: Fix uaf in l2cap_connect 2024-09-27 10:52:18 -04:00
l2cap_sock.c Bluetooth: L2CAP: Fix deadlock 2024-06-28 14:32:02 -04:00
leds.c Bluetooth: Use led_set_brightness() in LED trigger activate() callback 2024-09-10 13:06:11 -04:00
leds.h
lib.c Bluetooth: Add documentation to exported functions in lib 2023-12-22 12:54:55 -05:00
Makefile Bluetooth: Remove hci_request.{c,h} 2024-07-15 10:11:35 -04:00
mgmt_config.c Bluetooth: mgmt: Use the correct print format 2021-06-26 07:12:42 +02:00
mgmt_config.h Bluetooth: mgmt: Add commands for runtime configuration 2020-06-18 13:11:03 +03:00
mgmt_util.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
mgmt_util.h Bluetooth: Fix a buffer overflow in mgmt_mesh_add() 2023-01-17 15:50:10 -08:00
mgmt.c Including fixes from ieee802154, bluetooth and netfilter. 2024-10-03 09:44:00 -07:00
msft.c Bluetooth: Remove hci_request.{c,h} 2024-07-15 10:11:35 -04:00
msft.h Bluetooth: msft: fix slab-use-after-free in msft_do_close() 2024-05-03 13:05:28 -04:00
sco.c net-accept-more-20240515 2024-05-18 10:32:39 -07:00
selftest.c crypto: ecdh - move curve_id of ECDH from the key to algorithm name 2021-03-13 00:04:03 +11:00
selftest.h
smp.c Revert "Bluetooth: MGMT/SMP: Fix address type when using SMP over BREDR/LE" 2024-08-30 17:56:53 -04:00
smp.h Bluetooth: use inclusive language in SMP 2021-06-26 07:12:37 +02:00