An integer overflow flaw was found in the way the Linux kernel's networking subsystem processed TCP Selective Acknowledgment (SACK) segments. While processing SACK segments, the Linux kernel's socket buffer (SKB) data structure becomes fragmented. Each fragment is about TCP maximum segment size (MSS) bytes. To efficiently process SACK blocks, the Linux kernel merges multiple fragmented SKBs into one, potentially overflowing the variable holding the number of segments. A remote attacker could use this flaw to crash the Linux kernel by sending a crafted sequence of SACK segments on a TCP connection with small value of TCP MSS, resulting in a denial of service (DoS).
Action:
Option #1
Disable selective acknowledgments system wide for all newly established TCP connections.
# echo 0 > /proc/sys/net/ipv4/tcp_sack
Option #2
To prevent new connections with low MSS sizes using firewalld or iptables.
Red Hat Enterprise Linux 7 and 8 (firewalld).
# firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p tcp --tcp-flags SYN SYN -m tcpmss --mss 1:500 -j DROP
# firewall-cmd --reload
# firewall-cmd --permanent --direct --get-all-rules
Others (iptables)
# iptables -I INPUT -p tcp --tcp-flags SYN SYN -m tcpmss --mss 1:500 -j DROP
# service iptables save
Recommendation
Update kernel versions to the Linux stable releases as recommended by Linux kernel developers (https://www.openwall.com/lists/oss-security/2019/06/17/6)
Acknowledgements
Jonathan Looney (Netflix Information Security)
Ref:
https://access.redhat.com/security/vulnerabilities/tcpsack
https://github.com/Netflix/security-bulletins/blob/master/advisories/third-party/2019-001.md
0 comments:
Post a Comment