Bug 2134528 (CVE-2022-4129)

Summary: CVE-2022-4129 kernel: l2tp: missing lock when clearing sk_user_data can lead to NULL pointer dereference
Product: [Other] Security Response Reporter: Mauro Matteo Cascella <mcascell>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, bhu, brdeoliv, chwhite, crwood, ddepaula, debarbos, dvlasenk, ezulian, hkrzesin, jarod, jburrell, jfaracco, jferlan, jforbes, jlelli, joe.lawrence, jshortt, jstancek, jwyatt, kcarcia, kernel-mgr, lgoncalv, lleshchi, lzampier, nmurray, ptalbert, qzhao, rvrbovsk, scweaver, tyberry, vkumar, walters, 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:
A flaw was found in the Linux kernel's Layer 2 Tunneling Protocol (L2TP). A missing lock when clearing sk_user_data can lead to a race condition and NULL pointer dereference. A local user could use this flaw to potentially crash the system causing a denial of service.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-16 20:32:47 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: 2145232, 2145233, 2145234, 2145235, 2145237    
Bug Blocks: 2121459    

Description Mauro Matteo Cascella 2022-10-13 14:41:07 UTC
l2tp fails to grab the lock when modifying the underlying tunnel socket, possibly leading to a NULL pointer dereference and denial of service.

Upstream patch:
https://lore.kernel.org/all/20220823101459.211986-1-jakub@cloudflare.com/t [v3]
https://lore.kernel.org/all/20220815130107.149345-1-jakub@cloudflare.com/t [v2]
https://lore.kernel.org/all/20220810102848.282778-1-jakub@cloudflare.com/t [v1]

Comment 3 Mauro Matteo Cascella 2022-11-23 14:55:52 UTC
In reply to comment #0:
> l2tp fails to grab the lock when modifying the underlying tunnel socket,
> possibly leading to a NULL pointer dereference and denial of service.
> 
> Upstream patch:
> https://lore.kernel.org/all/20220823101459.211986-1-jakub@cloudflare.com/t [v3]

New version:
https://lore.kernel.org/all/20221114191619.124659-1-jakub@cloudflare.com/t [v4]

Note that the above patch does not entirely solve the issue, see follow up:

https://lore.kernel.org/netdev/20221121085426.21315-1-jakub@cloudflare.com/t [v2]
https://lore.kernel.org/netdev/20221119130317.39158-1-jakub@cloudflare.com/t [v1]

Comment 5 Mauro Matteo Cascella 2022-11-23 15:03:19 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2145237]

Comment 9 errata-xmlrpc 2023-05-09 07:12:07 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

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

Comment 10 errata-xmlrpc 2023-05-09 07:51:48 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

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

Comment 11 errata-xmlrpc 2023-05-16 08:05:27 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 12 errata-xmlrpc 2023-05-16 08:34:17 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 13 Product Security DevOps Team 2023-05-16 20:32:44 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-2022-4129

Comment 16 errata-xmlrpc 2024-01-24 16:42:40 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Extended Update Support

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