In the Linux kernel, the following vulnerability has been resolved: Bluetooth: SCO: give the socket its own sco_conn reference sco_conn_de
위협 신호 · CVSS · EPSS · KEV
이론적 심각도 점수
30일 내 악용 확률 예측
실측 악용 기록 없음
2주 이내 패치 — 우선 조치 대상
CVSS 벡터 · 메트릭
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H상세 설명
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: SCO: give the socket its own sco_conn reference
sco_conn_del() drops a reference it does not own. It takes one transient
reference via sco_conn_hold_unless_zero() and releases it with the
sco_conn_put() that follows sco_sock_hold(); the additional put in the
!sk branch releases a second one:
1conn = sco_conn_hold_unless_zero(conn); 2... 3sk = sco_sock_hold(conn); 4sco_conn_unlock(conn); 5sco_conn_put(conn); 6 7if (!sk) { 8 sco_conn_put(conn); 9 return;10}When close() races the controller's Disconnection Complete, sco_chan_del()
clears conn->sk and drops the socket's reference while sco_conn_del() is
running. sco_conn_del() then sees sk == NULL, its own put drops the count
to zero and frees the conn, and the second put writes to the freed kref:
1BUG: KASAN: slab-use-after-free in sco_conn_put.part.0+0x1a/0x190 2Write of size 4 at addr ffff8881099dec74 by task kworker/u17:3/413 3Workqueue: hci1 hci_rx_work 4Call Trace: 5 sco_conn_put.part.0+0x1a/0x190 6 hci_disconn_complete_evt+0x1ee/0x3e0 7 hci_event_packet+0x54a/0x650 8 hci_rx_work+0x321/0x3d0 9Allocated by task 413:10 sco_conn_add+0x72/0x1a011 sco_connect_cfm+0x88/0x67012Freed by task 413:13 sco_conn_del.isra.0+0x3f/0xf014 hci_disconn_complete_evt+0x1ee/0x3e015refcount_t: underflow; use-after-free.The root cause is that the socket stores the connection without holding a
reference of its own. __sco_chan_add() does:
1sco_pi(sk)->conn = conn;so the socket borrows whatever reference its caller happened to hold, and
the callers paper over that with ad-hoc holds and puts. Give the socket a
counted reference instead: __sco_chan_add() takes one and it is released
together with the channel (sco_chan_del()) and in sco_sock_destruct().
With the socket holding its own reference, sco_conn_del() no longer needs
the extra put and the redundant hold in sco_conn_ready() goes away.
Making the socket own its reference means the connection is now actually
freed on the error paths of sco_connect() where it used to leak, which in
turn runs sco_conn_free() and its hci_conn_drop(conn->hcon). To keep the
hci_conn accounting balanced, make that ownership explicit as well:
sco_conn_add() consumes one hci_conn reference and the sco_conn owns it for
its lifetime. sco_connect() hands over the reference returned by
hci_connect_sco() and no longer drops it on the error paths;
sco_connect_cfm(), which is not given a reference, takes one with
hci_conn_hold() before handing it to sco_conn_add() (and drops it again if
the allocation fails); and the explicit hci_conn_hold() in sco_conn_ready()
is removed. Every reference then has a single, clear owner.
AI 심층 분석
공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.