The tcp_find_option function of the netfilter subsystem for IPv6 in the SUSE Linux 2.6.5 kernel with USAGI patches, when using iptables and TCP options rules, allows remote attackers to cause a denial of service (CPU consumption by infinite loop) via a large option length that produces a negative integer after a casting operation to the char type, a similar flaw to CVE-2004-0626.
Remote attackers can trigger a denial-of-service (DoS) condition on vulnerable SUSE Linux systems by exploiting a flaw in the IPv6 netfilter subsystem. This vulnerability, stemming from an integer overflow within the tcp_find_option function, leads to an infinite loop, consuming excessive CPU resources and rendering the system unresponsive.
Step 1: Packet Crafting: The attacker crafts a malicious IPv6 packet containing a TCP option with a specifically crafted, large length value. This value is designed to cause an integer overflow when cast to a char type.
Step 2: Packet Transmission: The attacker sends the crafted packet to the vulnerable SUSE Linux system.
Step 3: Netfilter Processing: The packet is received and processed by the netfilter subsystem, specifically the tcp_find_option function.
Step 4: Option Length Calculation: The tcp_find_option function attempts to process the TCP option, using the attacker-supplied length.
Step 5: Integer Overflow: The large length value, when cast to a char, results in a negative integer due to the overflow.
Step 6: Infinite Loop: The negative integer is used in a loop condition within tcp_find_option. Because the condition is based on the negative value, the loop never terminates.
Step 7: CPU Exhaustion: The infinite loop consumes all available CPU resources, leading to a denial-of-service condition, making the system unresponsive.
The vulnerability lies within the tcp_find_option function of the netfilter subsystem, specifically in how it handles TCP options in IPv6 packets when used with iptables. The flaw occurs when processing a TCP option with a crafted length. A large option length, when cast to a char type, results in a negative integer. This negative value is then used in a loop condition, causing the loop to never terminate, leading to an infinite loop and CPU exhaustion. The root cause is an integer overflow vulnerability due to improper input validation of the TCP option length. The absence of bounds checking allows an attacker to provide a malicious length value, triggering the overflow and subsequent denial-of-service.