New issue
Advanced search Search tips

Issue 847903 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug-Security



Sign in to add a comment

Multiple UAF bugs fixed in the upstream kernel (most in the year 2017), but not patched in stable/latest chromeos4.4 kernel.

Reported by radheshk...@gmail.com, May 30 2018

Issue description

VULNERABILITY DETAILS

Following is the list of the UAF bugs fixed in the upstream kernel, but 
not patched in stable/latest chromeos4.4 kernel. Most of these bugs are patched
in 2017 and early 2018 so I think they might not be 
duplicate. 

Check following upstream kernel commits for the more details: 

1. upstream commit 5bdd0c6f89fba430e18d636493398389dadc3b17 (Bug patched year 2017)
   jffs2: Fix use-after-free bug in jffs2_iget()'s error handling path
   
2. upstream kernel commit : 607065bad9931e72207b0cac365d7d4abc06bd99 (2017, Dec)
    tcp: avoid integer overflows in tcp_rcv_space_adjust()

3. a9b9477db2937934e469db800317ec3ef7e81b51 (2017, Feb) 
    Btrfs: fix use-after-free due to wrong order of destroying work queues

4. e501bfe323356ea3f7ef79d4b0d95389b70a7193 (2017)
   btrfs: Prevent scrub recheck from racing with dev replace

5. dec95574f4e6545c701420b950278dc6f55d0368 (2017, march)
   btrfs: convert btrfs_raid_bio.refs from atomic_t to refcount_t

6. d879d0b8c183aabeb9a65eba91f3f9e3c7e7b905 (2017 Apr)
   ftrace: UAF in ftrace

7. d7cdee5ea8d28ae1b6922deb0c1badaa3aa0ef8c  (2018, Feb)
   cls_u32: fix use after free in u32_destroy_key()

8. 7fafcfdf6377b18b2a726ea554d6e593ba44349f (2018, Mar)
   USB: gadget: f_midi: fixing a double-free in f_midi

9. 1846430c24d66e85cc58286b3319c82cd54debb2 (2018 Jan)
   Btrfs: fix crash due to not cleaning up tree log block's dirty bits

10. 1a932ef4e47984dee227834667b5ff5a334e4805 (2018, Jan)
    Btrfs: fix use-after-free on root->orphan_block_rsv


VERSION
Operating System: OS-Chrome, Kernel:chromeos-4.4 

REPRODUCTION CASE

 

Comment 1 by mea...@chromium.org, May 30 2018

Cc: jorgelo@chromium.org mnissler@chromium.org
Components: OS>Kernel
Labels: OS-Chrome
Labels: Security_Severity-High Security_Impact-Stable
Owner: groeck@chromium.org

Comment 3 by groeck@chromium.org, May 30 2018

Cc: wonderfly@google.com
Labels: M-69 Pri-2
Status: Started (was: Unconfirmed)
CONFIG_BTRFS is not enabled in any ChromeOS images, which makes #3, #4, #5, #9, and #10 irrelevant for ChromeOS.
CONFIG_USB_F_MIDI is only enabled in beaglebone images, making #8 irrelevant for ChromeOS.
CONFIG_JFFS2_FS is only enabled in beaglebone images, making #1 irrelevant for ChromeOS.
The problem fixed by #7 was introduced after v4.4.

This leaves #2 and #6.
#2 needs a backport. We will fix it by submitting it for inclusion into v4.4.y and pick from there. From security perspective, its impact appears to be low since writing into sysctl_tcp_rmem requires privileges.

#6 is risky as it touches code which has been heavily modified since v4.4. On top of that, there are other unfixed problems in the ftrace code. Since ftrace requires privileges, it is an unlikely attack vector. We will not fix this problem unless someone can show that it is a high security risk.

Comment 4 by groeck@chromium.org, May 30 2018

Status: ExternalDependency (was: Started)
Backport of #2 submitted for stable releases (v4.9.y and v4.14.y are also affected). Waiting for fix to be available in stable releases.

Cc: xueweiz@google.com
@groeck, I thought the btrfs is supported by ChromeOS. Where do I check whether a specific config flags is enabled for ChromeOS? I also thought the latest kernel version supported by ChromeOS is 4.4. How(/from where) do I checkout the version 4.9 and 4.14 for ChromeOS? And my last question is whether these bugs (bugs that are not backported to ChromeOS kernel) are eligible for bug bounty program? 

Comment 7 by groeck@chromium.org, May 31 2018

#6: btrfs is not enabled in any ChromeOS images. Anyone is free to use it, but it is "bug-for-bug compatible" with respective upstream kernel stable releases for chromeos-4.4 and later, and may not even build for older versions. Enabled configuration fragments are for the most part in the chromeos/ subdirectory.
There is no chromeos-4.9; however, v4.9.y is an upstream stable release, and it pays to help the community as they help us. chromeos-4.4 and chromeos-4.14 are branches in the ChromeOS kernel repository at https://chromium.googlesource.com/chromiumos/third_party/kernel/.

As for the bug bounty program, you are asking the wrong person. I would suggest to consult https://www.google.com/about/appsecurity/chrome-rewards/.
As per https://www.google.com/about/appsecurity/chrome-rewards/index.html, bugs that have been previously disclosed don't always qualify for a reward:

"Bugs disclosed publicly or to a third-party for purposes other than fixing the bug will typically not qualify for a reward."
Project Member

Comment 9 by sheriffbot@chromium.org, May 31 2018

Labels: -Pri-2 Pri-1
@jorgelo, it says, "don't *always* qualify". I am asking about the bugs that are not known to be existent in ChromeOS kernel (\bugs that are not backported to ChromeOS kernel); hence, they are not exactly publicly disclosed yet. It takes lot of effort to find such bugs that still exist in the kernel. Especially, when you guys are actively back porting the patches to ChromeOS kernel.

The page https://www.google.com/about/appsecurity/chrome-rewards/index.html doesn't talk clearly about these types of bugs. Hence, the question about the bug bounty.  
I understand what you're asking for. I was attempting to give you some details to what things we take into account when choosing what to reward and what not. Whatever decision gets made will be posted to this bug as an update.
Follow-up on #4: Patch is now queued into affected stable releases (v4.4.y, v4.9.y, v4.14.y).

Clarification for previous comment: The number referred to the comment number, not to the patch number. The queued patch is patch #2.

Update on patch #6: According to https://www.spinics.net/lists/stable/msg168316.html,
the problem does not affect v4.4 and thus also not chromeos-4.4. Since it was applied prior to v4.14, it does not affect chromeos-4.14 either.

Labels: -Security_Severity-High Security_Severity-Low
Reducing security severity: As found, only  bug #2  affects any ChromeOS images.  Bug #2  can only be observed as result of misconfiguration, which is only possible with privileges. I would not even consider this to be a security bug in the first place. The fix was not deemed important enough by the upstream maintainer to apply to stable kernel releases.

Projected stable releases for  bug #2 : v4.4.136, v4.9.107, v4.14.48

Status: Fixed (was: ExternalDependency)
Fix for #2 pushed into both chromeos-4.4 and chromeos-4.14.

Project Member

Comment 18 by sheriffbot@chromium.org, Jun 14 2018

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Labels: reward-topanel
Project Member

Comment 20 by sheriffbot@chromium.org, Sep 20

Labels: -Restrict-View-SecurityNotify allpublic
This bug has been closed for more than 14 weeks. Removing security view restrictions.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -reward-topanel reward-0

Sign in to add a comment