Bug 644156 (CVE-2010-3848, CVE-2010-3849, CVE-2010-3850) - CVE-2010-3848 CVE-2010-3849 CVE-2010-3850 kernel: multiple vulnerabilities in Linux AF_ECONET
Summary: CVE-2010-3848 CVE-2010-3849 CVE-2010-3850 kernel: multiple vulnerabilities in...
Alias: CVE-2010-3848, CVE-2010-3849, CVE-2010-3850
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2010-10-19 03:19 UTC by Eugene Teo (Security Response)
Modified: 2018-10-27 11:21 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-06-10 22:25:26 UTC

Attachments (Terms of Use)

Description Eugene Teo (Security Response) 2010-10-19 03:19:52 UTC
Description of problem:
Reported by Nelson Elhage.

CVE-2010-3848 AF_ECONET kernel stack overflow
CVE-2010-3849 AF_ECONET saddr->cookie NULL dereferences
CVE-2010-3850 AF_ECONET SIOCSIFADDR ioctl does not check privileges

The two main vulnerabilities lie in the econet_sendmsg() function. If CONFIG_ECONET_AUNUDP, the function declares a variable-length array of iovec's
on the stack:

static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
			  struct msghdr *msg, size_t len)
	struct iovec iov[msg->msg_iovlen+1];

"msg->msg_iovlen" is a user-controlled value <= 1024; 1024 'struct iovec's is
enough to overflow the kernel stack and clobber the 'thread_info' struct on
either 32- or 64-bit systems with or without CONFIG_4KSTACKS.

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 ec_dev_ioctl 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 econet_sendmsg will return almost immediately if no
econet addresses are configured.


Comment 1 Eugene Teo (Security Response) 2010-10-19 03:20:49 UTC

Not vulnerable. This issue did not affect the versions of Linux kernel as shipped with Red Hat Enterprise Linux 3, 4, 5, 6 or Red Hat Enterprise MRG. Red Hat does not provide support for the Acorn Econet network protocol.

Note You need to log in before you can comment on or make changes to this bug.