Bug 1529120 (CVE-2017-17864)

Summary: CVE-2017-17864 kernel: information disclosure via pointer leak in kernel/bpf/verifier.c
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: airlied, ajax, aquini, bhu, blc, bskeggs, dhoward, ewk, fhrbata, hdegoede, hkrzesin, hwkernel-mgr, iboverma, ichavero, itamar, jarodwilson, jforbes, jglisse, jkacur, john.j5live, jolsa, jonathan, josef, jross, jwboyer, kernel-maint, kernel-mgr, labbott, lgoncalv, linville, matt, mchehab, mcressma, mjg59, mlangsdo, nmurray, nsl, plougher, ppandit, psampaio, rt-maint, rvrbovsk, skozina, steved, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-12 13:04:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1529125, 1535008    
Bug Blocks: 1528364    

Description Pedro Sampaio 2017-12-26 14:26:56 UTC
kernel/bpf/verifier.c in the Linux kernel through 4.14.8 mishandles states_equal comparisons between the pointer data type and the UNKNOWN_VALUE data type, which allows local users to obtain potentially sensitive address information, aka a "pointer leak."

Upstream commit:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/commit/?id=f3027591be9b80b66f2a2378cb67af106e7bfdee

References:

https://www.spinics.net/lists/stable/msg207010.html
https://www.openwall.com/lists/oss-security/2017/12/24/1

Comment 1 Pedro Sampaio 2017-12-26 14:48:04 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1529125]

Comment 3 Prasad J Pandit 2018-01-18 05:22:39 UTC
Statement:

This issue does not affect the versions of the kernel package as shipped with Red Hat Enterprise Linux 5, 6, 7 and Red Hat Enterprise MRG 2.

Comment 5 Jiri Olsa 2018-12-12 14:24:32 UTC
(In reply to Pedro Sampaio from comment #0)
> kernel/bpf/verifier.c in the Linux kernel through 4.14.8 mishandles
> states_equal comparisons between the pointer data type and the UNKNOWN_VALUE
> data type, which allows local users to obtain potentially sensitive address
> information, aka a "pointer leak."
> 
> References:
> 
> https://anonscm.debian.org/cgit/kernel/linux.git/tree/debian/patches/bugfix/
> all/bpf-verifier-fix-states_equal-comparison-of-pointer-and-unknown.
> patch?h=stretch-security
> https://anonscm.debian.org/cgit/kernel/linux.git/commit/?h=stretch-
> security&id=ad775f6ff7eebb93eedc2f592bc974260e7757b0

those links no longer works, also can't see that commit upstream,
could you please provide new links?

thanks,
jirka

Comment 6 Pedro Sampaio 2018-12-21 13:52:54 UTC
Sorry I missed this needinfo. E-mail filters broke after bugzilla update.

The references were updated.

I believe this was only committed to 4.9 stable branch upstream, as the references point out.

Please let me know if anything else is needed.

Comment 7 Jiri Olsa 2019-01-04 16:58:36 UTC
(In reply to Pedro Sampaio from comment #6)
> Sorry I missed this needinfo. E-mail filters broke after bugzilla update.
> 
> The references were updated.
> 
> I believe this was only committed to 4.9 stable branch upstream, as the
> references point out.
> 
> Please let me know if anything else is needed.

so following 3 are already in rhel8:
  bpf-adjust-insn_aux_data-when-patching-insns.patch 
  bpf-fix-branch-pruning-logic.patch 
  bpf-fix-incorrect-sign-extension-in-check_alu_op.patch 


but I can't upstream version of this one:
  bpf-reject-out-of-bounds-stack-pointer-calculation.patch

any idea?

thanks,
jirka

Comment 9 Jiri Olsa 2019-01-08 13:08:03 UTC
(In reply to Pedro Sampaio from comment #8)
> This one you looking for?
> 
> https://lkml.org/lkml/2017/12/25/95
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tag/?h=v4.9.
> 72

no, the upstream version (if there is any) of this commit:
  bpf-reject-out-of-bounds-stack-pointer-calculation.patch

this is 4.9 stable fix, which is usually backport of the upstream
commit.. but in this case it looks like this was 4.9 specific fix,
because I can't find the upstream (not stable) change

jirka

Comment 10 Nicholas Luedtke 2019-01-08 14:16:21 UTC
I think the fixing commit for the upstream (mainline) was https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=179d1c5602997fef5a940c6ddcf31212cbfebd14.

Comment 11 Jiri Olsa 2019-01-08 16:00:17 UTC
(In reply to Nicholas Luedtke from comment #10)
> I think the fixing commit for the upstream (mainline) was
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/
> ?id=179d1c5602997fef5a940c6ddcf31212cbfebd14.

this one got merged in v4.15, so we have it in RHEL8 together with the rest,
so I'll close the RHEL8 BZ as CURRENTRELEASE

jirka

Comment 12 Product Security DevOps Team 2019-07-12 13:04:42 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2017-17864