{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-21789",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-12-29T08:45:45.766Z",
        "datePublished": "2025-02-27T02:18:27.817Z",
        "dateUpdated": "2026-08-05T11:54:27.092Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T11:54:27.092Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: csum: Fix OoB access in IP checksum code for negative lengths\n\nCommit 69e3a6aa6be2 (\"LoongArch: Add checksum optimization for 64-bit\nsystem\") would cause an undefined shift and an out-of-bounds read.\n\nCommit 8bd795fedb84 (\"arm64: csum: Fix OoB access in IP checksum code\nfor negative lengths\") fixes the same issue on ARM64."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H",
                        "baseScore": 7.3,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The negative length originates from skb metadata (csum_start vs. transport header offset) that the attacker sets locally via an AF_PACKET/tun socket with virtio_net_hdr, not from remote packet header fields — every RX path that derives lengths from peer-supplied headers validates them first (e.g. `tcf_csum_skb_nextlayer()`'s `ipl < hl` check). Exploitation therefore requires local socket API access.\nAC:L - The attacker deterministically chooses csum_start, csum_offset and gso_size in the virtio_net_hdr and immediately drives the packet through the GSO segmentation path; there is no race, no memory-layout dependency, and no state outside the attacker's control.\nPR:L - An unprivileged local user can obtain CAP_NET_RAW in a new user+network namespace (`unshare -Urn`) and open the AF_PACKET socket needed to inject the crafted virtio_net_hdr; no real root and no init-namespace capability is required.\nUI:N - The entire sequence is a single sendmsg() by the attacker's own process; no victim action, mount, or file open is involved.\nS:U - The out-of-bounds read stays within the kernel's own address space and security authority — there is no VM, IOMMU, or sandbox boundary crossed.\nC:H - This is a slab-out-of-bounds read (KASAN reports it as an unbounded ~4 GB read) whose out-of-bounds bytes are folded into the checksum that is then written into the outgoing packet header and transmitted, giving the attacker an observable channel onto adjacent kernel heap contents.\nI:L - The undefined shift makes the tail-masking meaningless, so a corrupted checksum is computed from out-of-bounds data and stored into the transmitted packet's checksum field; this modifies network data but yields no kernel memory write primitive.\nA:H - On KASAN/UBSAN-instrumented kernels the negative length produces a slab-out-of-bounds report and an undefined-shift splat that panics under the widely deployed panic_on_warn setting, and the huge shadow-memory scan from `kasan_check_read()` with a ~4 GB size makes an oops the expected outcome."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "arch/loongarch/lib/csum.c"
                    ],
                    "versions": [
                        {
                            "version": "69e3a6aa6be21de6aaf38130fad97ecde34a193c",
                            "lessThan": "964a8895704a22efc06a2a3276b624a5ae985a06",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "69e3a6aa6be21de6aaf38130fad97ecde34a193c",
                            "lessThan": "9f15a8df542c0f08732a67d1a14ee7c22948fb97",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "69e3a6aa6be21de6aaf38130fad97ecde34a193c",
                            "lessThan": "d6508ffff32b44b6d0de06704034e4eef1c307a7",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "69e3a6aa6be21de6aaf38130fad97ecde34a193c",
                            "lessThan": "6287f1a8c16138c2ec750953e35039634018c84a",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "arch/loongarch/lib/csum.c"
                    ],
                    "versions": [
                        {
                            "version": "6.4",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.4",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.79",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.16",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.13.4",
                            "lessThanOrEqual": "6.13.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.14",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.4",
                                    "versionEndExcluding": "6.6.79"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.4",
                                    "versionEndExcluding": "6.12.16"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.4",
                                    "versionEndExcluding": "6.13.4"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.4",
                                    "versionEndExcluding": "6.14"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/964a8895704a22efc06a2a3276b624a5ae985a06"
                },
                {
                    "url": "https://git.kernel.org/stable/c/9f15a8df542c0f08732a67d1a14ee7c22948fb97"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d6508ffff32b44b6d0de06704034e4eef1c307a7"
                },
                {
                    "url": "https://git.kernel.org/stable/c/6287f1a8c16138c2ec750953e35039634018c84a"
                }
            ],
            "title": "LoongArch: csum: Fix OoB access in IP checksum code for negative lengths",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "metrics": [
                    {
                        "cvssV3_1": {
                            "scope": "UNCHANGED",
                            "version": "3.1",
                            "baseScore": 7.1,
                            "attackVector": "LOCAL",
                            "baseSeverity": "HIGH",
                            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H",
                            "integrityImpact": "NONE",
                            "userInteraction": "NONE",
                            "attackComplexity": "LOW",
                            "availabilityImpact": "HIGH",
                            "privilegesRequired": "LOW",
                            "confidentialityImpact": "HIGH"
                        }
                    },
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2025-21789",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2025-10-01T19:29:57.287707Z"
                            }
                        }
                    }
                ],
                "problemTypes": [
                    {
                        "descriptions": [
                            {
                                "lang": "en",
                                "type": "CWE",
                                "cweId": "CWE-125",
                                "description": "CWE-125 Out-of-bounds Read"
                            }
                        ]
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2025-10-01T19:36:39.729Z"
                }
            }
        ]
    }
}