CVE-2009-0029: Input Validation

Published Jan 10, 2009
·
Updated

From vendor-sec: Christian Borntraeger found a security relevant problem with the Linux system calls argument passing for at least s390, powerpc, sparc64 and mips:

The ABI for some architectures defines that the caller of a function has to sign extend each parameter to full register width. This is a problem in Linux system call handling.

For example with this system call on 64 bit:

asmlinkage long sysexample(unsigned int index) { if (index > 5) return -EINVAL; return examplearray[index]; }

It would mean that the caller has to sign extend index to 64 bit. In this case the caller is userspace. So we cannot rely on a correct sign extension.

But actually we just pass userspace delivered parameters unmodified to the system call function.

The above example could break like this:

The compiler can create code that will only test the lower 32 bits of the register that contain index to make sure its value is <= 5. However to access the memory location to get the value out of the array it can use the same unmodified (64 bit) register as index register, since the caller had to make sure that the upper 32 bits of the register contain zeroes. But since the value came from user space this isn't guaranteed and can lead to an addressing exception. Or userspace reads or even writes from/to memory locations it is not allowed to have access to.

Please note that this has nothing to do with compat system calls. This is an issue with 64 bit kernel and 64 bit userspace but 32 bit arguments.

Unfortunately the issue must be considered to be already public:

http://marc.info/?l=linux-kernel&m=123155111608910&w=2

Other sources

The ABI in the Linux kernel 2.6.28 and earlier on s390, powerpc, sparc64, and mips 64-bit platforms requires that a 32-bit argument in a 64-bit register was properly sign extended when sent from a user-mode application, but cannot verify this, which allows local users to cause a denial of service (crash) or possibly gain privileges via a crafted system call.

Red Hat

Affected Software

3 affected components
Linux Linux kernel<=2.6.28
Debian Debian Linux=5.0
Debian Debian Linux=4.0

Event History

Jan 10, 2009
CVE Published
via Red Hat·12:00 AM
Data Sourced
via Red Hat·12:00 AM
RemedyDescriptionSeverityWeakness
Jan 14, 2009
Data Sourced
via Red Hat·10:50 AM
Affected Software
Jan 15, 2009
CVE Published
via MITRE·05:00 PM
Data Sourced
via MITRE·05:00 PM
Description
Data Sourced
via NVD·05:30 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2009-0029?

CVE-2009-0029 has a medium severity rating, as it can lead to a denial of service.

2

How do I fix CVE-2009-0029?

To mitigate CVE-2009-0029, upgrade to a Linux kernel version later than 2.6.28.

3

Who is affected by CVE-2009-0029?

CVE-2009-0029 affects local users on 64-bit s390, powerpc, sparc64, and mips platforms running Linux kernel versions 2.6.28 and earlier.

4

What does CVE-2009-0029 exploit?

CVE-2009-0029 exploits the Linux kernel's inability to properly verify sign extension of 32-bit arguments in a 64-bit register.

5

Is there a workaround for CVE-2009-0029?

Currently, the best workaround for CVE-2009-0029 is to ensure that user-mode applications do not pass improperly formatted arguments.

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