lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <b1e7cccf-6e5e-aae8-09fc-6caafedc4a65@gmail.com>
Date:   Wed, 18 Dec 2019 20:37:19 +0800
From:   Jia-Ju Bai <baijiaju1990@...il.com>
To:     marcel@...tmann.org, johan.hedberg@...il.com
Cc:     linux-bluetooth@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [BUG] net: bluetooth: a possible sleep-in-atomic-context bug in
 disconnect_all_peers()

The kernel module may sleep while holding a spinlock.
The function call path (from bottom to top) in Linux 4.19 is:

net/bluetooth/l2cap_core.c, 840:
     mutex_lock in l2cap_get_ident
net/bluetooth/l2cap_core.c, 1402:
     l2cap_get_ident in l2cap_send_disconn_req
net/bluetooth/l2cap_core.c, 736:
     l2cap_send_disconn_req in l2cap_chan_close
net/bluetooth/6lowpan.c, 1053:
     l2cap_chan_close in disconnect_all_peers
net/bluetooth/6lowpan.c, 1051:
     spin_lock in disconnect_all_peers

mutex_lock() can sleep at runtime.

I am not sure how to properly fix this possible bug, so I only report it.

This bug is found by a static analysis tool STCheck written by myself.


Best wishes,
Jia-Ju Bai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ