🇰🇷 한글 설명
Linux 커널의 bcmgenet 이더넷 드라이버에서, 전송 중인 skb(소켓 버퍼)를 공유 상태 그대로 재사용하면서 제어 블록(control block)이 덮어써지는 문제가 해결되었습니다. 이로 인해 BQL(Byte Queue Limits) 카운트가 제대로 차감되지 않아 송신 큐가 멈추는 현상이 발생할 수 있었습니다. 수정에서는 제어 블록을 기록하기 전에 skb를 unshare하도록 변경되었습니다.
💡 쉬운 설명
네트워크 카드가 같은 데이터 묶음을 여러 번 보내는 상황에서 기록 정보가 서로 덮어써져 전송 대기열이 막힐 수 있었습니다. 이번 수정으로 데이터 묶음을 따로 분리한 뒤 기록하도록 바뀌어 대기열이 정상적으로 비워집니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: bcmgenet: unshare the skb before writing the control block
bcmgenet stores first_cb, last_cb and bytes_sent in the skb control
block and reads them back on completion to free the skb and credit BQL.
ether_setup() leaves IFF_TX_SKB_SHARING set, so the stack can resubmit
a shared skb that is still in the ring. The next transmit overwrites
last_cb, so the earlier slots complete without crediting their bytes
and BQL stalls the queue until the watchdog resets it.
Unshare the skb before writing the control block.
Reproduce with pktgen in clone_skb mode, which hands the driver the same
skb while earlier copies are still in the ring:
modprobe pktgen
pg=/proc/net/pktgen
echo "add_device eth0" > $pg/kpktgend_0
echo "dst_mac AA:BB:CC:DD:EE:FF" > $pg/eth0
echo "dst 192.0.2.1" > $pg/eth0
echo "clone_skb 8" > $pg/eth0
echo "count 0" > $pg/eth0
echo start > $pg/pgctrl &
sleep 5
echo stop > $pg/pgctrl
wait
cat /sys/class/net/eth0/queues/tx-0/byte_queue_limits/inflight
inflight stays nonzero on the now idle queue. clone_skb 0 leaves it at
zero.
📍 영향받는 시스템
Broadcom bcmgenet 이더넷 드라이버를 사용하는 Linux 커널 (수정 커밋 이전 버전, 정확한 영향 버전은 커널 changelog 확인 필요)
⚔️ 공격 벡터
공격 정보 없음. 드라이버 내부 결함으로 인한 전송 큐 정지(서비스 거부 성격)이며, 원격 악용 경로는 확인되지 않음
🛡️ 대응 방법
해당 수정이 포함된 최신 Linux 커널 버전으로 업데이트하거나 배포판의 보안 업데이트를 적용
🔧 검증 코드
커널 버전이 수정 포함 버전 이상인지 확인하고, bcmgenet 모듈이 없으면 이 취약점의 영향을 받지 않으며, 있으면 배포판 보안 공지로 패치 적용 여부를 확인
uname -r && (lsmod | grep -i bcmgenet || echo 'bcmgenet 모듈 미로드')