<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.openanolis.cn/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.openanolis.cn/"
          
          maintainer="service@openanolis.org"
>

    <bug>
          <bug_id>8153</bug_id>
          <alias>CVE-2024-24859</alias>
          <creation_ts>2024-02-01 17:23:57 +0000</creation_ts>
          <short_desc>Bluetooth: sniff_{min,max}_interval_set函数存在竞争条件</short_desc>
          <delta_ts>2024-03-06 10:21:19 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>5</classification_id>
          <classification>ANCK</classification>
          <product>ANCK 5.10 Dev</product>
          <component>drivers</component>
          <version>5.10.y-16</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3-Medium</priority>
          <bug_severity>S3-normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Shiloong">shile.zhang</reporter>
          <assigned_to name="GuixinLiu">kanie</assigned_to>
          <cc>mqaio</cc>
    
    
    <cc>xlpang</cc>
          
          <qa_contact name="shuming">qingming.su</qa_contact>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>25638</commentid>
    <comment_count>0</comment_count>
    <who name="Shiloong">shile.zhang</who>
    <bug_when>2024-02-01 17:23:57 +0000</bug_when>
    <thetext>上报人信息：
  - 白家驹 &lt;baijiaju@buaa.edu.cn&gt;
  - 北京航空航天大学网络空间安全学院

成因：
sniff_{min,max}_interval_set函数用于更新hdev-&gt;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-&gt;sniff_{min,max}_interval是蓝牙组件的重要参数。hci_conn_idle是蓝牙进入嗅探模式的函数，会使用sniff_{min,max}_interval初始化hci_cp_sniff_subrate，决定了嗅探时间间隔，sniff_{min,max}_interval非法，会造成蓝牙嗅探异常。

bug触发后，hdev-&gt;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/</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>