ipvs: clear IPv4 options after rebasing tunnel ICMP errors
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f2edb9f7706dcb2c0d9a362b2ba849efe3a97f5e · < 75eec935444db4af2123e0491936f6e273d7ea00| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ipvs: clear IPv4 options after rebasing tunnel ICMP errors
ip_vs_in_icmp() rebases an skb from the outer ICMP packet to the quoted original request before passing it to icmp_send(). However, IPCB(skb)->opt still describes the outer IPv4 header.
A timestamp option in the outer header can therefore leave an offset that points into the quoted transport header after the rebase. __ip_options_echo() treats a byte at that stale location as the option length and copies it into the fixed-size option storage on the __icmp_send() stack, causing a stack out-of-bounds write.
Clear the stale option metadata after resetting the network header. Keep the remaining control block fields, including the ingress interface used by the ICMP response path.
From the CVE record · Linux
The Linux kernel’s IPVS ICMP handling can retain stale IPv4 option metadata after rebasing a tunnel ICMP error. A timestamp option in the outer IPv4 header can cause a stack out-of-bounds write when the kernel generates an ICMP response. The input does not establish whether authentication or user interaction is required.
Operators running Linux kernels with IPVS should check whether their kernel includes the fix; affected versions were not specified.