Bug 716842 (CVE-2011-2494)

Summary: CVE-2011-2494 kernel: taskstats io infoleak
Product: [Other] Security Response Reporter: Eugene Teo (Security Response) <eteo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: anton, arozansk, bhu, davej, dhoward, fhrbata, jkacur, kernel-mgr, kmcmartin, lgoncalv, lwang, plougher, pmatouse, rt-maint, sforsber, tcallawa, vgoyal, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-04 07:06:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 716845, 716846, 716847, 716848, 716849, 761355    
Bug Blocks: 716823    

Description Eugene Teo (Security Response) 2011-06-27 09:04:27 UTC
taskstats information may be used for gathering private information.  E.g. for openssh and vsftpd daemons read_characters/write_characters may be used to learn the precise password length.  Restrict it to processes being able to ptrace the target process.  For TASKSTATS_CMD_ATTR_REGISTER_CPUMASK the fix is euid check instead of a ptrace check as the handler is processed in the context of the target process, not the listener process'.  When ptrace_task_may_access_current() is introduced, it should be used instead of euid check.  Currently there is a small race when a process temporarily changes its euid (e.g. to access user's files), until the process sets euid back user's processes may gather privileged process' statistics.

taskstats authorized_keys presence infoleak PoC
http://seclists.org/oss-sec/2011/q2/659

[0/2] restrict statistics information to user
https://lkml.org/lkml/2011/6/24/88
[1/2] proc: restrict access to /proc/PID/io (CVE-2011-2495)
https://patchwork.kernel.org/patch/916032/
[2/2] taskstats: restrict access to user (CVE-2011-2494)
https://patchwork.kernel.org/patch/916042/

http://article.gmane.org/gmane.comp.security.oss.general/5337
Linus suggested returning accounting information at a 1k granularity instead.

Acknowledgements:

Red Hat would like to thank Vasiliy Kulikov of Openwall for reporting this issue.

Comment 3 Eugene Teo (Security Response) 2011-06-27 09:18:29 UTC
Statement:

This issue did not affect the versions of Linux kernel as shipped with Red Hat Enterprise Linux 4 as it did not provide support for the Taskstats interface. This has been addressed in Red Hat Enterprise Linux 5, 6 and Red Hat Enterprise MRG via https://rhn.redhat.com/errata/RHSA-2011-1479.html, https://rhn.redhat.com/errata/RHSA-2011-1465.html, and https://rhn.redhat.com/errata/RHSA-2012-0010.html.

Comment 4 Eugene Teo (Security Response) 2011-06-29 06:12:21 UTC
(In reply to comment #0)
[...]
> [2/2] taskstats: restrict access to user (CVE-2011-2494)
> https://patchwork.kernel.org/patch/916042/

http://article.gmane.org/gmane.comp.security.oss.general/5366

Comment 5 Petr Matousek 2011-09-21 17:17:11 UTC
(In reply to comment #4)
> (In reply to comment #0)
> [...]
> > [2/2] taskstats: restrict access to user (CVE-2011-2494)
> > https://patchwork.kernel.org/patch/916042/
> 
> http://article.gmane.org/gmane.comp.security.oss.general/5366

Upstream patch:

https://github.com/torvalds/linux/commit/1a51410abe7d0ee4b1d112780f46df87d3621043

Comment 6 errata-xmlrpc 2011-11-22 16:49:35 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2011:1465 https://rhn.redhat.com/errata/RHSA-2011-1465.html

Comment 7 errata-xmlrpc 2011-11-29 14:35:56 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2011:1479 https://rhn.redhat.com/errata/RHSA-2011-1479.html

Comment 9 errata-xmlrpc 2012-01-10 20:15:44 UTC
This issue has been addressed in following products:

  MRG for RHEL-6 v.2

Via RHSA-2012:0010 https://rhn.redhat.com/errata/RHSA-2012-0010.html