Linux kernel: ZERO_SIZE_PTR dereference for long symlinks in Be FS

2011.09.01
Credit: Timo Warns
Risk: Low
Local: Yes
Remote: No
CWE: CWE-59
CWE-20


Ogólna skala CVSS: 4.9/10
Znaczenie: 6.9/10
Łatwość wykorzystania: 3.9/10
Wymagany dostęp: Lokalny
Złożoność ataku: Niska
Autoryzacja: Nie wymagana
Wpływ na poufność: Brak
Wpływ na integralność: Brak
Wpływ na dostępność: Pełny

PRE-CERT Security Advisory ========================== * Advisory: PRE-SA-2011-06 * Released on: 19 August 2011 * Last updated on: 19 August 2011 * Affected product: Linux Kernel 2.4, 2.6, and 3.0 * Impact: denial-of-service * Origin: Be file system * Credit: Timo Warns (PRESENSE Technologies GmbH) * CVE Identifier: CVE-2011-2928 Summary ------- The Linux kernel contains a vulnerability in the driver for Be file systems that may lead to a kernel oops via a corrupted Be file system. In fs/befs/linuxvfs.c, befs_follow_link() reads a length attribute for a long symlink from a data stream of a Be file system. befs_data_stream *data = &befs_ino->i_data.ds; befs_off_t len = data->size; The data->size / len value is not validated and can be 0 on a corrupted file system. befs_follow_link() allocates some memory based on len. Effectively, kmalloc returns ZERO_SIZE_PTR in this case. link = kmalloc(len, GFP_NOFS); Subsequently, an assignment dereferences ZERO_SIZE_PTR causing a kernel oops: link[len - 1] = '\0'; Workaround ---------- Compile and use a kernel that does not support the Be file system. The corresponding configuration key is CONFIG_BEFS_FS. Solution -------- A patch is available at http://git.kernel.org/linus/338d0f0a6fbc82407864606f5b64b75aeb3c70f2 References ---------- When further information becomes available, this advisory will be updated. The most recent version of this advisory is available at: http://www.pre-cert.de/advisories/PRE-SA-2011-06.txt Contact -------- PRE-CERT can be reached under precert (at) pre-secure (dot) de. [email concealed] For PGP key information, refer to http://www.pre-cert.de/.

Referencje:

http://www.openwall.com/lists/oss-security/2011/08/19/5
http://www.openwall.com/lists/oss-security/2011/08/19/1
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=338d0f0a6fbc82407864606f5b64b75aeb3c70f2
http://xforce.iss.net/xforce/xfdb/69343
http://www.securityfocus.com/bid/49256
http://www.securityfocus.com/archive/1/archive/1/519387/100/0/threaded
http://www.pre-cert.de/advisories/PRE-SA-2011-06.txt
http://www.kernel.org/pub/linux/kernel/v3.0/testing/ChangeLog-3.1-rc3


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top