Duty Analyst: Joseph McCarthy

CVE-2026-43050

Published: 2026-05-01 15:16:51 | Last modified: 2026-05-07 18:21:20

HIGH CVSS 7.0
No EPSS data

Description

In the Linux kernel, the following vulnerability has been resolved:

atm: lec: fix use-after-free in sock_def_readable()

A race condition exists between lec_atm_close() setting priv->lecd
to NULL and concurrent access to priv->lecd in send_to_lecd(),
lec_handle_bridge(), and lec_atm_send(). When the socket is freed
via RCU while another thread is still using it, a use-after-free
occurs in sock_def_readable() when accessing the socket's wait queue.

The root cause is that lec_atm_close() clears priv->lecd without
any synchronization, while callers dereference priv->lecd without
any protection against concurrent teardown.

Fix this by converting priv->lecd to an RCU-protected pointer:
- Mark priv->lecd as __rcu in lec.h
- Use rcu_assign_pointer() in lec_atm_close() and lecd_attach()
for safe pointer assignment
- Use rcu_access_pointer() for NULL checks that do not dereference
the pointer in lec_start_xmit(), lec_push(), send_to_lecd() and
lecd_attach()
- Use rcu_read_lock/rcu_dereference/rcu_read_unlock in send_to_lecd(),
lec_handle_bridge() and lec_atm_send() to safely access lecd
- Use rcu_assign_pointer() followed by synchronize_rcu() in
lec_atm_close() to ensure all readers have completed before
proceeding. This is safe since lec_atm_close() is called from
vcc_release() which holds lock_sock(), a sleeping lock.
- Remove the manual sk_receive_queue drain from lec_atm_close()
since vcc_destroy_socket() already drains it after lec_atm_close()
returns.

v2: Switch from spinlock + sock_hold/put approach to RCU to properly
fix the race. The v1 spinlock approach had two issues pointed out
by Eric Dumazet:
1. priv->lecd was still accessed directly after releasing the
lock instead of using a local copy.
2. The spinlock did not prevent packets being queued after
lec_atm_close() drains sk_receive_queue since timer and
workqueue paths bypass netif_stop_queue().

Note: Syzbot patch testing was attempted but the test VM terminated
unexpectedly with "Connection to localhost closed by remote host",
likely due to a QEMU AHCI emulation issue unrelated to this fix.
Compile testing with "make W=1 net/atm/lec.o" passes cleanly.

CVSS details

Severity
high
Score
7.0
Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

EPSS

This CVE is not currently listed in the EPSS dataset.

Show JSON
{
    "cve": {
        "id": "CVE-2026-43050",
        "cveTags": [],
        "metrics": {
            "cvssMetricV31": [
                {
                    "type": "Primary",
                    "source": "nvd@nist.gov",
                    "cvssData": {
                        "scope": "UNCHANGED",
                        "version": "3.1",
                        "baseScore": 7,
                        "attackVector": "LOCAL",
                        "baseSeverity": "HIGH",
                        "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "integrityImpact": "HIGH",
                        "userInteraction": "NONE",
                        "attackComplexity": "HIGH",
                        "availabilityImpact": "HIGH",
                        "privilegesRequired": "LOW",
                        "confidentialityImpact": "HIGH"
                    },
                    "impactScore": 5.9,
                    "exploitabilityScore": 1
                }
            ]
        },
        "published": "2026-05-01T15:16:51.403",
        "references": [
            {
                "url": "https://git.kernel.org/stable/c/317843d5355062020649124eb4a0d7acbcc3f53e",
                "tags": [
                    "Patch"
                ],
                "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
            },
            {
                "url": "https://git.kernel.org/stable/c/3989740fa4978e1d2d51ecc62be1b01093e104ad",
                "tags": [
                    "Patch"
                ],
                "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
            },
            {
                "url": "https://git.kernel.org/stable/c/3e8b25f32f2f35549d03d77da030a24a45bdef5b",
                "tags": [
                    "Patch"
                ],
                "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
            },
            {
                "url": "https://git.kernel.org/stable/c/5fbbb1ff936d7ff9528d929c1549977e8123d8a8",
                "tags": [
                    "Patch"
                ],
                "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
            },
            {
                "url": "https://git.kernel.org/stable/c/750a33f417f3d196b86375f8d9f8938bacf130fe",
                "tags": [
                    "Patch"
                ],
                "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
            },
            {
                "url": "https://git.kernel.org/stable/c/922814879542c2e397b0e9641fd36b8202a8e555",
                "tags": [
                    "Patch"
                ],
                "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
            },
            {
                "url": "https://git.kernel.org/stable/c/abc10f85a3965ac14b9ed7ad3e67b35604a63aa3",
                "tags": [
                    "Patch"
                ],
                "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
            },
            {
                "url": "https://git.kernel.org/stable/c/b256d055da47258e63f8b40965f276c5f23d229a",
                "tags": [
                    "Patch"
                ],
                "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
            }
        ],
        "vulnStatus": "Analyzed",
        "weaknesses": [
            {
                "type": "Primary",
                "source": "nvd@nist.gov",
                "description": [
                    {
                        "lang": "en",
                        "value": "CWE-416"
                    }
                ]
            }
        ],
        "descriptions": [
            {
                "lang": "en",
                "value": "In the Linux kernel, the following vulnerability has been resolved:\n\natm: lec: fix use-after-free in sock_def_readable()\n\nA race condition exists between lec_atm_close() setting priv->lecd\nto NULL and concurrent access to priv->lecd in send_to_lecd(),\nlec_handle_bridge(), and lec_atm_send(). When the socket is freed\nvia RCU while another thread is still using it, a use-after-free\noccurs in sock_def_readable() when accessing the socket's wait queue.\n\nThe root cause is that lec_atm_close() clears priv->lecd without\nany synchronization, while callers dereference priv->lecd without\nany protection against concurrent teardown.\n\nFix this by converting priv->lecd to an RCU-protected pointer:\n- Mark priv->lecd as __rcu in lec.h\n- Use rcu_assign_pointer() in lec_atm_close() and lecd_attach()\n  for safe pointer assignment\n- Use rcu_access_pointer() for NULL checks that do not dereference\n  the pointer in lec_start_xmit(), lec_push(), send_to_lecd() and\n  lecd_attach()\n- Use rcu_read_lock/rcu_dereference/rcu_read_unlock in send_to_lecd(),\n  lec_handle_bridge() and lec_atm_send() to safely access lecd\n- Use rcu_assign_pointer() followed by synchronize_rcu() in\n  lec_atm_close() to ensure all readers have completed before\n  proceeding. This is safe since lec_atm_close() is called from\n  vcc_release() which holds lock_sock(), a sleeping lock.\n- Remove the manual sk_receive_queue drain from lec_atm_close()\n  since vcc_destroy_socket() already drains it after lec_atm_close()\n  returns.\n\nv2: Switch from spinlock + sock_hold/put approach to RCU to properly\n    fix the race. The v1 spinlock approach had two issues pointed out\n    by Eric Dumazet:\n    1. priv->lecd was still accessed directly after releasing the\n       lock instead of using a local copy.\n    2. The spinlock did not prevent packets being queued after\n       lec_atm_close() drains sk_receive_queue since timer and\n       workqueue paths bypass netif_stop_queue().\n\nNote: Syzbot patch testing was attempted but the test VM terminated\n    unexpectedly with \"Connection to localhost closed by remote host\",\n    likely due to a QEMU AHCI emulation issue unrelated to this fix.\n    Compile testing with \"make W=1 net/atm/lec.o\" passes cleanly."
            }
        ],
        "lastModified": "2026-05-07T18:21:19.700",
        "configurations": [
            {
                "nodes": [
                    {
                        "negate": false,
                        "cpeMatch": [
                            {
                                "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                "vulnerable": true,
                                "matchCriteriaId": "5F0E43E1-33E5-4828-9B4A-F710AF2E7217",
                                "versionEndExcluding": "5.10.253",
                                "versionStartIncluding": "2.6.12.1"
                            },
                            {
                                "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                "vulnerable": true,
                                "matchCriteriaId": "20DDB3E9-AABF-4107-ADB0-5362AA067045",
                                "versionEndExcluding": "5.15.203",
                                "versionStartIncluding": "5.11"
                            },
                            {
                                "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                "vulnerable": true,
                                "matchCriteriaId": "E2DDDCA1-6DAB-4018-B920-8F045DDD8D3B",
                                "versionEndExcluding": "6.1.168",
                                "versionStartIncluding": "5.16"
                            },
                            {
                                "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                "vulnerable": true,
                                "matchCriteriaId": "F56F925B-BAF8-4F4B-B62F-1496AF19A307",
                                "versionEndExcluding": "6.6.134",
                                "versionStartIncluding": "6.2"
                            },
                            {
                                "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                "vulnerable": true,
                                "matchCriteriaId": "6EF80433-B33B-43C5-8E64-0FA7B8DCE1BC",
                                "versionEndExcluding": "6.12.81",
                                "versionStartIncluding": "6.7"
                            },
                            {
                                "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                "vulnerable": true,
                                "matchCriteriaId": "C9DF8BCE-36D3-475D-9D21-19E4F02F9029",
                                "versionEndExcluding": "6.18.22",
                                "versionStartIncluding": "6.13"
                            },
                            {
                                "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                "vulnerable": true,
                                "matchCriteriaId": "0A2B9540-02D5-41B4-B16A-82AF66FD4F36",
                                "versionEndExcluding": "6.19.12",
                                "versionStartIncluding": "6.19"
                            },
                            {
                                "criteria": "cpe:2.3:o:linux:linux_kernel:2.6.12:-:*:*:*:*:*:*",
                                "vulnerable": true,
                                "matchCriteriaId": "6F62EECE-8FB1-4D57-85D8-CB9E23CF313C"
                            },
                            {
                                "criteria": "cpe:2.3:o:linux:linux_kernel:2.6.12:rc2:*:*:*:*:*:*",
                                "vulnerable": true,
                                "matchCriteriaId": "4F76C298-81DC-43E4-8FC9-DC005A2116EF"
                            },
                            {
                                "criteria": "cpe:2.3:o:linux:linux_kernel:2.6.12:rc3:*:*:*:*:*:*",
                                "vulnerable": true,
                                "matchCriteriaId": "0AB349B2-3F78-4197-882B-90ADB3BF645A"
                            },
                            {
                                "criteria": "cpe:2.3:o:linux:linux_kernel:2.6.12:rc4:*:*:*:*:*:*",
                                "vulnerable": true,
                                "matchCriteriaId": "6AC88830-A9BC-4607-B572-A4B502FC9FD0"
                            },
                            {
                                "criteria": "cpe:2.3:o:linux:linux_kernel:2.6.12:rc5:*:*:*:*:*:*",
                                "vulnerable": true,
                                "matchCriteriaId": "476CB3A5-D022-4F13-AAEF-CB6A5785516A"
                            },
                            {
                                "criteria": "cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*",
                                "vulnerable": true,
                                "matchCriteriaId": "F253B622-8837-4245-BCE5-A7BF8FC76A16"
                            },
                            {
                                "criteria": "cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*",
                                "vulnerable": true,
                                "matchCriteriaId": "4AE85AD8-4641-4E7C-A2F4-305E2CD9EE64"
                            },
                            {
                                "criteria": "cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*",
                                "vulnerable": true,
                                "matchCriteriaId": "F666C8D8-6538-46D4-B318-87610DE64C34"
                            },
                            {
                                "criteria": "cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*",
                                "vulnerable": true,
                                "matchCriteriaId": "02259FDA-961B-47BC-AE7F-93D7EC6E90C2"
                            }
                        ],
                        "operator": "OR"
                    }
                ]
            }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
}