CVE-2011-4097: Integer Overflow

Published Nov 1, 2011
·
Updated

https://lkml.org/lkml/2011/10/31/138 An integer overflow will happen on 64bit archs if task's sum of rss, swapents and nrptes exceeds (2^31)/1000 value. This was introduced by commit f755a04 oom: use pte pages in OOM score

where the oom score computation was divided into several steps and it's no longer computed as one expression in unsigned long(rss, swapents, nrpte are unsigned long), where the result value assigned to points(int) is in range(1..1000). So there could be an int overflow while computing

176 points = 1000;

and points may have negative value. Meaning the oom score for a mem hog task will be one.

196 if (points <= 0) 197 return 1; For example: [ 3366] 0 3366 35390480 24303939 5 0 0 oom01 Out of memory: Kill process 3366 (oom01) score 1 or sacrifice child

Here the oom1 process consumes more than 24303939(rss)4096~=92GB physical memory, but it's oom score is one.

In this situation the mem hog task is skipped and oom killer kills another and most probably innocent task with oom score greater than one.

The points variable should be of type long instead of int to prevent the int overflow.

Signed-off-by: Frantisek Hrbata <fhrbata> --- mm/oomkill.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/oomkill.c b/mm/oomkill.c index 626303b..e9a1785 100644 --- a/mm/oomkill.c +++ b/mm/oomkill.c @@ -162,7 +162,7 @@ static bool oomunkillabletask(struct taskstruct p, unsigned int oombadness(struct taskstruct p, struct memcgroup mem, const nodemaskt nodemask, unsigned long totalpages) { - int points; + long points; if (oomunkillabletask(p, mem, nodemask)) return 0;

Introduced by: http://git.kernel.org/linus/f755a04

Upstream commit: TBD

Acknowledgements:

Red Hat would like to thank Shubham Goyal for reporting this issue.

Other sources

Integer overflow in the oombadness function in mm/oomkill.c in the Linux kernel before 3.1.8 on 64-bit platforms allows local users to cause a denial of service (memory consumption or process termination) by using a certain large amount of memory.

Launchpad

Affected Software

3 affected components
debian/linux-2.6
Linux Linux kernel<3.1.8
redhat Enterprise Linux=6.0

Event History

Nov 1, 2011
Data Sourced
via Red Hat·12:36 AM
DescriptionSeverityAffected Software
May 17, 2012
CVE Published
via MITRE·10:00 AM
Data Sourced
via MITRE·10:00 AM
Description
Jan 11, 2024
Data Sourced
via Launchpad·09:58 PM
Description
Sep 16, 2024
Data Sourced
via Ubuntu·12:42 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2011-4097?

CVE-2011-4097 has been assigned a medium severity due to the potential for integer overflow affecting system stability.

2

How do I fix CVE-2011-4097?

The recommended fix for CVE-2011-4097 is to update your Linux kernel to version 3.1.8 or later to mitigate the integer overflow issue.

3

Which systems are affected by CVE-2011-4097?

CVE-2011-4097 affects 64-bit Linux kernel versions prior to 3.1.8 and specific distributions like Debian and Red Hat Enterprise Linux 6.0.

4

What kind of vulnerability is CVE-2011-4097?

CVE-2011-4097 is an integer overflow vulnerability that occurs when the sum of a task's RSS, swapents, and nr_ptes exceeds a specific value.

5

What impact does CVE-2011-4097 have on systems?

CVE-2011-4097 can lead to system instability and potentially cause out-of-memory conditions due to improper handling of memory allocation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203