CVE-2011-2203: Null Pointer Dereference

Published Jun 13, 2011
·
Updated

hfsfindinit() is wrongly assuming that sb->exttree has already been opened and is not NULL but this function can be called when sb->exttree is currently being opened (NULL deref).

Indeed when we have the following call path, the NULL deref. occurs:

In hfsmdbget() we have (at this stage exttree == NULL):

HFSSB(sb)->exttree = hfsbtreeopen(sb, HFSEXTCNID, hfsextkeycmp);

hfsbtreeopen() is calling readmappingpage() which is indirectly a call to hfsreadpage(). Then hfsreadpage() can make the following calls:

hfsreadpage() -> hfsgetblock() -> allocbufferhead() -> hfsextreadextent()

Then hfsextreadextent() calls hfsfindinit() with an exttree == NULL. Then we have a NULL dereference in hfsfindinit().

ptr = kmalloc(tree->maxkeylen (...));

Due to the huge call stack from hfsbtreeopen() to hfsfindinit() there are many ways to fix this dereference but I can't find the proper way to fix it.

Moreover if we look at the code in hfsfindinit().

20 ptr = kmalloc(tree->maxkeylen 2 + 4, GFPKERNEL); 21 if (!ptr) 22 return -ENOMEM; 23 fd->searchkey = ptr; 24 fd->key = ptr + tree->maxkeylen + 2;

We can make "maxkeylen 2 + 4" wrap and have an fd->key pointing outside of the kmalloc()'ed space. Moreover we can make space in fd->searchkey lower than maxkeylen and bad things can occur.

Reference: https://lkml.org/lkml/2011/6/8/154

Acknowledgements:

Red Hat would like to thank Clement Lecigne for reporting this issue.

Other sources

The hfsfindinit function in the Linux kernel 2.6 allows local users to cause a denial of service (NULL pointer dereference and Oops) by mounting an HFS file system with a malformed MDB extent record.

Launchpad

Affected Software

2 affected components
debian/linux-2.6
Linux Linux kernel=2.6

Event History

Jun 13, 2011
Data Sourced
via Red Hat·05:25 AM
DescriptionSeverityAffected Software
Jan 27, 2012
CVE Published
via MITRE·03:00 PM
Data Sourced
via MITRE·03:00 PM
Description
Data Sourced
via NVD·03:55 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jan 15, 2024
Data Sourced
via Launchpad·09:58 PM
Description
Sep 15, 2024
Data Sourced
via Ubuntu·10:44 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2011-2203?

CVE-2011-2203 is classified as a high severity vulnerability due to its potential to cause a NULL pointer dereference.

2

How do I fix CVE-2011-2203?

To fix CVE-2011-2203, you should upgrade to a patched version of the Linux kernel that addresses this vulnerability.

3

What systems are affected by CVE-2011-2203?

CVE-2011-2203 affects the Linux kernel version 2.6, particularly those configurations making use of the hfs file system.

4

What type of vulnerability is CVE-2011-2203?

CVE-2011-2203 is a NULL pointer dereference vulnerability that can lead to a denial of service.

5

How does CVE-2011-2203 impact system security?

CVE-2011-2203 can impact system security by potentially crashing the kernel when the affected function is invoked.

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