Bug 8153 (CVE-2024-24859) - Bluetooth: sniff_{min,max}_interval_set函数存在竞争条件
Summary: Bluetooth: sniff_{min,max}_interval_set函数存在竞争条件
Status: NEW
Alias: CVE-2024-24859
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:23 UTC by Shiloong
Modified: 2024-03-06 10:21 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:23:57 UTC
上报人信息:
  - 白家驹 <baijiaju@buaa.edu.cn>
  - 北京航空航天大学网络空间安全学院

成因:
sniff_{min,max}_interval_set函数用于更新hdev->sniff_{min,max}_interval,不允许使sniff_max_interval小于sniff_min_interval,但在判断更新参数合法性时没有持有锁,sniff_{min,max}_interval可能在判断更新参数合法性后被改写,使判断更新参数合法性的比较无效化,从而写入非法的sniff_{min,max}_interval,使sniff_max_interval小于sniff_min_interval。
	
危害分析:hdev->sniff_{min,max}_interval是蓝牙组件的重要参数。hci_conn_idle是蓝牙进入嗅探模式的函数,会使用sniff_{min,max}_interval初始化hci_cp_sniff_subrate,决定了嗅探时间间隔,sniff_{min,max}_interval非法,会造成蓝牙嗅探异常。

bug触发后,hdev->sniff_{min,max}_interval非法,造成蓝牙嗅探异常,可以用于拒绝服务攻击。

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

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