CVE-2010-3848: Buffer Overflow
Description of problem: Reported by Nelson Elhage.
CVE-2010-3848 AFECONET kernel stack overflow CVE-2010-3849 AFECONET saddr->cookie NULL dereferences CVE-2010-3850 AFECONET SIOCSIFADDR ioctl does not check privileges
The two main vulnerabilities lie in the econetsendmsg() function. If CONFIGECONETAUNUDP, the function declares a variable-length array of iovec's on the stack:
static int econetsendmsg(struct kiocb iocb, struct socket sock, struct msghdr msg, sizet len) { ... #ifdef CONFIGECONETAUNUDP ... struct iovec iov[msg->msgiovlen+1]; ... #endif
"msg->msgiovlen" is a user-controlled value <= 1024; 1024 'struct iovec's is enough to overflow the kernel stack and clobber the 'threadinfo' struct on either 32- or 64-bit systems with or without CONFIG4KSTACKS.
The code populates 'iov' with user-controlled values, so this is almost certainly exploitable for privesc.
The second bug is conveniently labeled as such for anyone who cares to look:
/ BUG: saddr may be NULL / eb->cookie = saddr->cookie;
In fact, 'saddr' comes from userspace and may be NULL (if non-NULL, it will have been copied to kernelspace), leading to a NULL-pointer dereference. This saddr->cookie dereference appears twice, once in the "hardware" case and once in the "UDP emulation" case. This is easily exploitable for an oops, but probably not anything more.
The final issue is in the ecdevioctl function. The SIOCSIFADDR ioctl does not check privileges, allowing an unprivileged user to assign econet addresses to arbitrary interfaces. It is possible this is intentional, but AFAIK it would be unusual for SIOCSIFADDR to be unprivileged, so this may be an accident.
Note that it is necessary to use this property in order to make the first two bugs exploitable, since econetsendmsg will return almost immediately if no econet addresses are configured.
Reference: http://seclists.org/oss-sec/2010/q4/236
Other sources
Stack-based buffer overflow in the econetsendmsg function in net/econet/afeconet.c in the Linux kernel before 2.6.36.2, when an econet address is configured, allows local users to gain privileges by providing a large number of iovec structures.
— Launchpad
Affected Software
Remediation
Patch Available
Patch Available
Event History
Frequently Asked Questions
What is the severity of CVE-2010-3848?
CVE-2010-3848 is classified as a high-severity vulnerability due to its potential to cause a kernel stack overflow.
How do I fix CVE-2010-3848?
To mitigate CVE-2010-3848, upgrade to the latest version of the affected Linux kernel or apply the appropriate patches provided by your distribution.
What systems are affected by CVE-2010-3848?
CVE-2010-3848 affects multiple versions of the Linux kernel including those in Debian, Ubuntu, and SUSE distributions.
What are the potential impacts of CVE-2010-3848?
The exploitation of CVE-2010-3848 can lead to system crashes and may allow an attacker to execute arbitrary code with elevated privileges.
Who reported CVE-2010-3848?
CVE-2010-3848 was reported by security researcher Nelson Elhage.