This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/15448] New: Integer overflow in sched.h cpu set CPU_* macros
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 09 May 2013 02:48:34 +0000
- Subject: [Bug libc/15448] New: Integer overflow in sched.h cpu set CPU_* macros
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15448
Bug #: 15448
Summary: Integer overflow in sched.h cpu set CPU_* macros
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: unassigned@sourceware.org
ReportedBy: bugdal@aerifal.cx
CC: drepper.fsp@gmail.com
Classification: Unclassified
In file sysdeps/unix/sysv/linux/bits/sched.h, the cpu set macros attempt to
check for overflow of the cpu index, but fail to do so properly due to an
integer overflow error. The condition:
147 __cpu < 8 * (setsize)
overflows if setsize is greater than SIZE_MAX/8. The correct test would be:
__cpu/8 < (setsize)
which is valid since the low 3 bits of __cpu are irrelevant to whether the
index overflows.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.