CVE-2019-11477 - Integer Overflow or Wraparound

Severity

78%

Complexity

99%

Confidentiality

115%

Jonathan Looney discovered that the TCP_SKB_CB(skb)->tcp_gso_segs value was subject to an integer overflow in the Linux kernel when handling TCP Selective Acknowledgments (SACKs). A remote attacker could use this to cause a denial of service. This has been fixed in stable kernel releases 4.4.182, 4.9.182, 4.14.127, 4.19.52, 5.1.11, and is fixed in commit 3b4929f65b0d8249f19a50245cd88ed1a2f78cff.

Jonathan Looney discovered that the TCP_SKB_CB(skb)->tcp_gso_segs value was subject to an integer overflow in the Linux kernel when handling TCP Selective Acknowledgments (SACKs). A remote attacker could use this to cause a denial of service. This has been fixed in stable kernel releases 4.4.182, 4.9.182, 4.14.127, 4.19.52, 5.1.11, and is fixed in commit 3b4929f65b0d8249f19a50245cd88ed1a2f78cff.

CVSS 3.0 Base Score 7.5. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

CVSS 2.0 Base Score 7.8. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (AV:N/AC:L/Au:N/C:N/I:N/A:C).

Demo Examples

Integer Overflow or Wraparound

CWE-190

The following image processing code allocates a table for images.


               
...

This code intends to allocate a table of size num_imgs, however as num_imgs grows large, the calculation determining the size of the list will eventually overflow (CWE-190). This will result in a very small list to be allocated instead. If the subsequent code operates on the list as if it were num_imgs long, it may result in many types of out-of-bounds problems (CWE-119).

Integer Overflow or Wraparound

CWE-190

The following code excerpt from OpenSSH 3.3 demonstrates a classic case of integer overflow:


               
}
for (i = 0; i < nresp; i++) response[i] = packet_get_string(NULL);

If nresp has the value 1073741824 and sizeof(char*) has its typical value of 4, then the result of the operation nresp*sizeof(char*) overflows, and the argument to xmalloc() will be 0. Most malloc() implementations will happily allocate a 0-byte buffer, causing the subsequent loop iterations to overflow the heap buffer response.

Integer Overflow or Wraparound

CWE-190

Integer overflows can be complicated and difficult to detect. The following example is an attempt to show how an integer overflow may lead to undefined looping behavior:


               
}
bytesRec += getFromInput(buf+bytesRec);

In the above case, it is entirely possible that bytesRec may overflow, continuously creating a lower number than MAXGET and also overwriting the first MAXGET-1 bytes of buf.

Integer Overflow or Wraparound

CWE-190

In this example the method determineFirstQuarterRevenue is used to determine the first quarter revenue for an accounting/business application. The method retrieves the monthly sales totals for the first three months of the year, calculates the first quarter sales totals from the monthly sales totals, calculates the first quarter revenue based on the first quarter sales, and finally saves the first quarter revenue results to the database.


               
}
return 0;// Variable for sales revenue for the quarter// Calculate quarterly total// Calculate the total revenue for the quarter

However, in this example the primitive type short int is used for both the monthly and the quarterly sales variables. In C the short int primitive type has a maximum value of 32768. This creates a potential integer overflow if the value for the three monthly sales adds up to more than the maximum value for the short int primitive type. An integer overflow can lead to data corruption, unexpected behavior, infinite loops and system crashes. To correct the situation the appropriate primitive type should be used, as in the example below, and/or provide some validation mechanism to ensure that the maximum value for the primitive type is not exceeded.


               
}
...// Calculate quarterly total// Calculate the total revenue for the quarter

Note that an integer overflow could also occur if the quarterSold variable has a primitive type long but the method calculateRevenueForQuarter has a parameter of type short.

Overview

First reported 5 years ago

2019-06-19 00:15:00

Last updated 5 years ago

2019-06-20 20:15:00

Affected Software

Linux Kernel

F5 Big-IP Advanced Firewall Manager (AFM)

F5 Big-IP Advanced Firewall Manager (AFM) 15.0.0

15.0.0

F5 Big-IP Access Policy Manager (APM)

F5 Big-IP Access Policy Manager (APM) 15.0.0

15.0.0

F5 Big-IP Application Acceleration Manager (AAM)

F5 Big-IP Application Acceleration Manager (AAM) 15.0.0

15.0.0

F5 Big-IP Link Controller

F5 Big-IP Link Controller 15.0.0

15.0.0

F5 Big-IP Policy Enforcement Manager (PEM)

F5 Big-IP Policy Enforcement Manager (PEM) 15.0.0

15.0.0

F5 Big-IP WebAccelerator

F5 Big-IP WebAccelerator 15.0.0

15.0.0

F5 Big-IP Application Security Manager (ASM)

F5 Big-IP Application Security Manager (ASM) 15.0.0

15.0.0

F5 Networks Big-IP Local Traffic Manager (LTM)

F5 Big-IP Local Traffic Manager (LTM) 15.0.0

15.0.0

F5 Big-IP Fraud Protection Service (FPS)

F5 Big-IP Fraud Protection Service (FPS) 15.0.0

15.0.0

F5 Big-IP Global Traffic Manager (GTM)

F5 Big-IP Global Traffic Manager (GTM) 15.0.0

15.0.0

F5 Big-IP Analytics

F5 Big-IP Analytics 15.0.0

15.0.0

F5 Big-IP Edge Gateway

F5 Big-IP Edge Gateway 15.0.0

15.0.0

F5 Big-IP Domain Name System (DNS)

F5 Big-IP Domain Name System (DNS) 15.0.0

15.0.0

Canonical Ubuntu Linux 12.04 ESM (Extended Security Maintenance)

12.04

Canonical Ubuntu Linux 14.04 ESM Edition

14.04

Canonical Ubuntu Linux 16.04 LTS (Long-Term Support)

16.04

Canonical Ubuntu Linux 18.04 LTS Edition

18.04

Canonical Ubuntu Linux 18.10

18.10

Canonical Ubuntu Linux 19.04

19.04

Red Hat Enterprise Linux Atomic Host

RedHat Enterprise MRG 2.0

2.0

Red Hat Enterprise Linux 5.0

5.0

Red Hat Enterprise Linux 6.0

6.0

Red Hat Enterprise Linux (RHEL) 7.0 (7)

7.0

Red Hat Enterprise Linux 8.0

8.0

Red Hat Enterprise Linux Extended Update Support (EUS) 7.4

7.4

Red Hat Enterprise Linux Extended Update Support (EUS) 7.5

7.5

Red Hat Virtualization 4.0

4.0

References

http://packetstormsecurity.com/files/153346/Kernel-Live-Patch-Security-Notice-LSN-0052-1.html

Third Party Advisory, VDB Entry

http://packetstormsecurity.com/files/154951/Kernel-Live-Patch-Security-Notice-LSN-0058-1.html

http://www.huawei.com/en/psirt/security-advisories/huawei-sa-20191225-01-kernel-en

[oss-security] 20190620 Re: Linux and FreeBSD Kernel: Multiple TCP-based remote denial of service issues

[oss-security] 20190628 Re: linux-distros membership application - Microsoft

[oss-security] 20190706 Re: linux-distros membership application - Microsoft

[oss-security] 20190706 Re: linux-distros membership application - Microsoft

[oss-security] 20191023 Membership application for linux-distros - VMware

[oss-security] 20191029 Re: Membership application for linux-distros - VMware

http://www.vmware.com/security/advisories/VMSA-2019-0010.html

RHSA-2019:1594

RHSA-2019:1602

RHSA-2019:1699

https://access.redhat.com/security/vulnerabilities/tcpsack

Third Party Advisory

https://cert-portal.siemens.com/productcert/pdf/ssa-462066.pdf

https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/?id=3b4929f65b0d8249f19a50245cd88ed1a2f78cff

Mailing List, Patch, Vendor Advisory

https://github.com/Netflix/security-bulletins/blob/master/advisories/third-party/2019-001.md

Patch, Third Party Advisory

https://kb.pulsesecure.net/articles/Pulse_Security_Advisories/SA44193

Third Party Advisory

https://kc.mcafee.com/corporate/index?page=content&id=SB10287

https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2019-0006

https://security.netapp.com/advisory/ntap-20190625-0001/

https://support.f5.com/csp/article/K78234183

Third Party Advisory

https://wiki.ubuntu.com/SecurityTeam/KnowledgeBase/SACKPanic

Mitigation, Third Party Advisory

VU#905115

https://www.oracle.com/security-alerts/cpujan2020.html

https://www.synology.com/security/advisory/Synology_SA_19_28

https://www.us-cert.gov/ics/advisories/icsa-19-253-03

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.