Bug 2119855 (CVE-2022-36879)

Summary: CVE-2022-36879 kernel: xfrm_expand_policies() in net/xfrm/xfrm_policy.c can cause a refcount to be dropped twice
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, adscvr, airlied, alciregi, bdettelb, bhu, brdeoliv, chwhite, crwood, ddepaula, debarbos, dvlasenk, fmaurer, hdegoede, hkrzesin, hpa, jarod, jarodwilson, jburrell, jfaracco, jferlan, jforbes, jglisse, jlelli, joe.lawrence, jonathan, josef, jreznik, jshortt, jstancek, jwboyer, jwyatt, kcarcia, kernel-maint, kernel-mgr, lgoncalv, linville, lxin, lzampier, masami256, mcascell, mchehab, nmurray, ptalbert, qzhao, rvrbovsk, scweaver, sdubroca, sgrubb, steved, sukulkar, tyberry, vkumar, walters, williams, wmealing
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 5.19-rc8 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the Linux kernel’s IP framework for transforming packets (XFRM subsystem). An error while resolving policies in xfrm_bundle_lookup causes the refcount to drop twice, leading to a possible crash and a denial of service.
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 2119856, 2122185, 2122186, 2122187, 2122188, 2136174, 2136193, 2183128, 2183129, 2183130, 2183131    
Bug Blocks: 2111787    

Description Guilherme de Almeida Suckevicz 2022-08-19 16:46:32 UTC
An issue was discovered in the Linux kernel through 5.18.14. xfrm_expand_policies in net/xfrm/xfrm_policy.c can cause a refcount to be dropped twice.

Reference and upstream patch:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=f85daf0e725358be78dfd208dea5fd665d8cb901

Comment 1 Guilherme de Almeida Suckevicz 2022-08-19 16:46:58 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2119856]

Comment 2 Justin M. Forbes 2022-08-22 21:12:15 UTC
This was fixed for Fedora with the 5.18.15 stable kernel updates.

Comment 33 Mauro Matteo Cascella 2023-09-15 13:05:10 UTC
This issue was fixed upstream in kernel version 5.19. The kernel packages as shipped with Red Hat Enterprise Linux 8 were previously updated to a version that contains the fix via the following errata:

kernel in Red Hat Enterprise Linux 8
https://access.redhat.com/errata/RHSA-2023:2951

kernel-rt in Red Hat Enterprise Linux 8
https://access.redhat.com/errata/RHSA-2023:2736

Comment 40 Mauro Matteo Cascella 2023-09-18 20:13:42 UTC
This issue was fixed upstream in kernel version 5.19. The kernel packages as shipped in Red Hat Enterprise Linux 9 were previously updated to a version that contains the fix via the following errata:

kernel in Red Hat Enterprise Linux 9
https://access.redhat.com/errata/RHSA-2023:2458

kernel-rt in Red Hat Enterprise Linux 9
https://access.redhat.com/errata/RHSA-2023:2148

Comment 44 errata-xmlrpc 2023-10-10 16:26:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Extended Update Support

Via RHSA-2023:5627 https://access.redhat.com/errata/RHSA-2023:5627

Comment 46 errata-xmlrpc 2024-01-24 15:24:21 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Extended Update Support

Via RHSA-2024:0431 https://access.redhat.com/errata/RHSA-2024:0431

Comment 47 errata-xmlrpc 2024-01-24 15:25:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Extended Update Support

Via RHSA-2024:0432 https://access.redhat.com/errata/RHSA-2024:0432