🇰🇷 한글 설명
Linux 커널의 ntb_netdev 드라이버에서 TX/RX 콜백 핸들러가 인터럽트 컨텍스트에서 호출될 때 인터럽트에 안전하지 않은 dev_kfree_skb()를 사용하던 문제를 수정했습니다. 이로 인해 AMD 시스템에서 커널 경고와 TCP/IP 성능 저하가 발생했으며, dev_kfree_skb_any()로 변경하여 해결했습니다.
💡 쉬운 설명
네트워크 데이터를 처리하는 리눅스 커널 드라이버가 잘못된 방식으로 메모리를 해제하여 AMD 서버에서 경고가 뜨고 네트워크 속도가 크게 떨어지는 문제가 있었습니다. 이를 올바른 방식으로 고쳐 정상 속도와 안정성을 되찾았습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ntb_netdev: Use dev_kfree_skb_any() in interrupt context
TX/RX callback handlers (ntb_netdev_tx_handler(),
ntb_netdev_rx_handler()) can be called in interrupt
context via the DMA framework when the respective
DMA operations have completed. As such, any calls
by these routines to free skb's, should use the
interrupt context safe dev_kfree_skb_any() function.
Previously, these callback handlers would call the
interrupt unsafe version of dev_kfree_skb(). This has
not presented an issue on Intel IOAT DMA engines as
that driver utilizes tasklets rather than a hard
interrupt handler, like the AMD PTDMA DMA driver.
On AMD systems, a kernel WARNING message is
encountered, which is being issued from
skb_release_head_state() due to in_hardirq()
being true.
Besides the user visible WARNING from the kernel,
the other symptom of this bug was that TCP/IP performance
across the ntb_netdev interface was very poor, i.e.
approximately an order of magnitude below what was
expected. With the repair to use dev_kfree_skb_any(),
kernel WARNINGs from skb_release_head_state() ceased
and TCP/IP performance, as measured by iperf, was on
par with expected results, approximately 20 Gb/s on
AMD Milan based server. Note that this performance
is comparable with Intel based servers.
📍 영향받는 시스템
패치 전 Linux 커널의 ntb_netdev 드라이버를 사용하는 AMD 기반 시스템 (주로 AMD PTDMA DMA 드라이버 환경)
⚔️ 공격 벡터
원격 공격 경로가 명확하지 않으며, 주로 커널 경고 발생과 네트워크 성능 저하로 나타나는 안정성 결함입니다.
🛡️ 대응 방법
배포판에서 제공하는 수정된 Linux 커널 업데이트를 설치하고 재부팅하세요.
🔧 검증 코드
커널 버전이 수정이 포함된 배포판 패치 버전 이상인지 확인하고, ntb_netdev 모듈이 로드되지 않았다면 이 취약점의 영향을 받지 않습니다.
uname -r && (lsmod | grep -i ntb_netdev || echo 'ntb_netdev 모듈 미로드')