kcve.ai취약점 정보 · 내 자산 확인

CVE-2022-50838 net: stream: purge sk_error_queue in sk_stream_kill_queues()

설명

In the Linux kernel, the following vulnerability has been resolved: net: stream: purge sk_error_queue in sk_stream_kill_queues() Changheon Lee reported TCP socket leaks, with a nice repro. It seems we leak TCP sockets with the following sequence: 1) SOF_TIMESTAMPING_TX_ACK is enabled on the socket. Each ACK will cook an skb put in error queue, from __skb_tstamp_tx(). __skb_tstamp_tx() is using skb_clone(), unless SOF_TIMESTAMPING_OPT_TSONLY was also requested. 2) If the application is also using MSG_ZEROCOPY, then we put in the error queue cloned skbs that had a struct ubuf_info attached to them. Whenever an struct ubuf_info is allocated, sock_zerocopy_alloc() does a sock_hold(). As long as the cloned skbs are still in sk_error_queue, socket refcount is kept elevated. 3) Application closes the socket, while error queue is not empty. Since tcp_close() no longer purges the socket error queue, we might end up with a TCP socket with at least one skb in error queue keeping the socket alive forever. This bug can be (ab)used to consume all kernel memory and freeze the host. We need to purge the error queue, with proper synchronization against concurrent writers.

영향 받는 제품 제품 1개

  • Linux

    Linux

    해결 버전 있음

    영향 받는 버전

    • 4.9.291 이상 4.9.337 미만
    • 4.14.256 이상 4.14.303 미만
    • 4.19.218 이상 4.19.270 미만
    • 5.4.160 이상 5.4.229 미만
    • 5.10.80 이상 5.10.163 미만
    • 5.15.3 이상 5.15.86 미만
    • 4.4.293 이상 4.5 미만
    • 5.14.19 이상 5.15 미만
    외 1개 구간 펼치기
    • 5.16

    해결 버전

    • 4.9.337 이상
    • 4.14.303 이상
    • 4.19.270 이상
    • 5.4.229 이상
    • 5.10.163 이상
    • 5.15.86 이상
    • 4.5 이상
    • 5.15 이상
    외 3개 구간 펼치기
    • 5.16 미만
    • 6.0.16 이상
    • 6.1.2 이상

참고 자료 9건

‹ 목록

점검 지원 범위 문의

도입 문의