ipvs: fix integer overflow in ftp helper port/address parsing
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 4aed450adaee3a021db27be94c61fe025b0d05ff| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ipvs: fix integer overflow in ftp helper port/address parsing
ip_vs_ftp_get_addrport() accumulates decimal digits into a __u16 (hport) and into unsigned char (p[]) without checking for overflow. A crafted FTP PASV/EPSV response with an over-long port or address octet wraps the value, so the helper configures the data connection with a truncated port/address.
The netfilter conntrack FTP helper had the same defect, fixed in commit 2b413fc689ba ("netfilter: nf_conntrack_ftp: avoid u16 overflows"). Apply the equivalent fix here: widen the port accumulator to u32 and reject values above 65535, and reject address octets above 255.
From the CVE record · Linux
The Linux kernel IPVS FTP helper does not check for overflow when parsing port and address values. A crafted FTP PASV/EPSV response can cause it to configure a data connection with a truncated port or address when the response is processed by the helper.
Teams running Linux kernels that use the IPVS FTP helper should check whether their kernel is affected; affected versions were not provided.