<?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>8155</bug_id>
          <alias>CVE-2024-24857</alias>
          <creation_ts>2024-02-01 17:30:40 +0000</creation_ts>
          <short_desc>Bluetooth: conn_info_{min,max}_age_set函数存在竞争条件</short_desc>
          <delta_ts>2024-03-06 10:08:03 +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>25641</commentid>
    <comment_count>0</comment_count>
    <who name="Shiloong">shile.zhang</who>
    <bug_when>2024-02-01 17:30:40 +0000</bug_when>
    <thetext>上报人信息：
  - 白家驹 &lt;baijiaju@buaa.edu.cn&gt;
  - 北京航空航天大学网络空间安全学院

成因：
conn_info_{min,max}_age_set函数用于更新hdev-&gt;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-&gt;conn_info_{min,max}_age是蓝牙组件的重要参数。hdev-&gt;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-&gt;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/</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>