Red Hat Bugzilla – Bug 659567
CVE-2010-4258 kernel: failure to revert address limit override in OOPS error path
Last modified: 2016-08-18 10:07:56 EDT
Nelson discovered an interesting interaction in the Linux kernel between the clear_child_tid feature of clone(2), and the set_fs() function used internally in the kernel to temporarily disable access_ok() checking of userspace pointers.
Under some (not totally uncommon) circumstances, it is possible for a user to leverage this interaction to turn a kernel oops or BUG() into a write of an integer 0 to a user-controlled address in kernel memory.
This is known to be exploited with CVE-2010-3849 - http://www.redhat.com/security/data/cve/CVE-2010-3849.html.
Red Hat would like to thank Nelson Elhage for reporting this issue.
This needs oops to first trigger the mm_release path with set_fs(KERNEL_DS) and invoke put_user(0, tsk->clear_child_tid). We have panic_on_oops set on rhel so this is not exploitable because mm_release will not get called and the box panics.
The Linux kernel as shipped with Red Hat Enterprise Linux 4, 5, 6, and Red Hat Enterprise MRG enabled the panic_on_oops sysctl tunable by default, and therefore are not affected by this issue. However, as a preventive measure (for example, for administrators who have turned panic_on_oops off), this issue was fixed in kernel updates in Red Hat Enterprise Linux 4, 5, 6, and Red Hat Enterprise MRG. Because the fix was considered as a preventative measure, this CVE is not listed in the related advisories that provided the fix: RHSA-2011:0162, RHSA-2011:0263, RHSA-2011:0017, RHSA-2011:0498, RHSA-2011:0542, RHSA-2011:0330. The fix is documented in each of these advisories as a regular bug fix, for example as BZ#659568 in RHSA-2011:0162.