Bug 8155 (CVE-2024-24857) - Bluetooth: conn_info_{min,max}_age_set函数存在竞争条件
Summary: Bluetooth: conn_info_{min,max}_age_set函数存在竞争条件
Status: NEW
Alias: CVE-2024-24857
Product: ANCK 5.10 Dev
Classification: ANCK
Component: drivers (show other bugs) drivers
Version: 5.10.y-16
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: GuixinLiu
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-01 17:30 UTC by Shiloong
Modified: 2024-03-06 10:08 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shiloong admin 2024-02-01 17:30:40 UTC
上报人信息:
  - 白家驹 <baijiaju@buaa.edu.cn>
  - 北京航空航天大学网络空间安全学院

成因:
conn_info_{min,max}_age_set函数用于更新hdev->conn_info_{min,max}_age,不允许使conn_info_max_age小于conn_info_min_age,但在判断更新参数合法性时没有持有锁,conn_info_{min,max}_age可能在判断更新参数合法性后被改写,使判断更新参数合法性的比较无效化,从而写入非法的conn_info_{min,max}_age,使conn_info_max_age小于conn_info_min_age。
	
危害分析:
hdev->conn_info_{min,max}_age是蓝牙组件的重要参数。hdev->conn_info_{min,max}_age在get_conn_info函数中被用于计算conn_info_age,采用了直接相减的形式,如果conn_info_max_age小于conn_info_min_age,会发生整数溢出,造成conn_info_age过大,get_conn_info返回非法缓冲值,造成蓝牙连接异常。

bug触发后,hdev->conn_info_{min,max}_age非法,会发生整数溢出,造成蓝牙连接异常,可以用于拒绝服务攻击。

修复缓解:
   - 在conn_info_{min,max}_age_set函数中,扩大缓冲区,将判断更新参数合法性代码纳入hci_dev_lock的临界区。

补丁已提交给Linux Kernel Bluetooth子系统维护者,补丁链接:https://lore.kernel.org/lkml/20231222162310.6461-1-2045gemini@gmail.com/T/