{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2021-47259",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-05-21T13:27:52.125Z",
        "datePublished": "2024-05-21T14:19:52.738Z",
        "dateUpdated": "2026-08-05T08:47:00.677Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T08:47:00.677Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nNFS: Fix use-after-free in nfs4_init_client()\n\nKASAN reports a use-after-free when attempting to mount two different\nexports through two different NICs that belong to the same server.\n\nOlga was able to hit this with kernels starting somewhere between 5.7\nand 5.10, but I traced the patch that introduced the clear_bit() call to\n4.13. So something must have changed in the refcounting of the clp\npointer to make this call to nfs_put_client() the very last one."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - This is NFS client code in fs/nfs/nfs4client.c (nfs4_init_client), reached via local mount or NFSv4 referral/submount automount (nfs_d_automount → nfs4_create_referral_server → nfs4_set_client → nfs_get_client), not via nfsd/ksmbd or unsolicited packet processing.\nAC:L - An attacker who can mount two exports via different NICs of the same server, or drive referral/migration to a trunking-matched address (including a cooperating/malicious NFS server), fully controls the trunking-discovery path that yields clp != old and frees clp before clear_bit; no race or layout outside attacker influence is required.\nPR:L - Although a fresh NFS mount needs CAP_SYS_ADMIN (nfs_fs_type lacks FS_USERNS_MOUNT), an unprivileged user can reach nfs4_init_client via NFSv4 referral/submount automounts or migration on an already-mounted export, matching prior CNA scoring of this same init path.\nUI:N - Once an NFS share is present, the attacker triggers the bug themselves by mounting/walking a referral or exercising migration; no separate victim action is required beyond that environmental mount.\nS:U - The use-after-free corrupts host kernel heap state within the same OS security authority and does not cross a VM, IOMMU, or other security-authority boundary.\nC:H - nfs_put_client can kfree the nfs_client while clear_bit still writes clp->cl_flags, a classic slab UAF; reclaim of the freed object enables arbitrary kernel memory disclosure under standard UAF exploitation.\nI:H - The post-free clear_bit is a write into freed nfs_client memory, and heap spraying the reclaimed object yields arbitrary-write and control-flow hijacking primitives consistent with scoring other kernel UAFs as High integrity.\nA:H - Use-after-free of struct nfs_client causes kernel oops/panic when the freed object is touched (KASAN reported this path), so availability impact is High even without a full exploit."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/nfs/nfs4client.c"
                    ],
                    "versions": [
                        {
                            "version": "8dcbec6d20eb881ba368d0aebc3a8a678aebb1da",
                            "lessThan": "c7eab9e2d7b4e983ce280276fb920af649955897",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8dcbec6d20eb881ba368d0aebc3a8a678aebb1da",
                            "lessThan": "42c10b0db064e45f5c5ae7019bbf2168ffab766c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8dcbec6d20eb881ba368d0aebc3a8a678aebb1da",
                            "lessThan": "3e3c7ebbfac152d08be75c92802a64a1f6471a15",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8dcbec6d20eb881ba368d0aebc3a8a678aebb1da",
                            "lessThan": "c3b6cf64dfe4ef96e7341508d50d6998da7062c7",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8dcbec6d20eb881ba368d0aebc3a8a678aebb1da",
                            "lessThan": "72651c6579a25317a90536181d311c663d0329ab",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8dcbec6d20eb881ba368d0aebc3a8a678aebb1da",
                            "lessThan": "476bdb04c501fc64bf3b8464ffddefc8dbe01577",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/nfs/nfs4client.c"
                    ],
                    "versions": [
                        {
                            "version": "4.13",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "4.13",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.14.237",
                            "lessThanOrEqual": "4.14.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.19.195",
                            "lessThanOrEqual": "4.19.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.4.126",
                            "lessThanOrEqual": "5.4.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.44",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.12.11",
                            "lessThanOrEqual": "5.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.13",
                            "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": "4.13",
                                    "versionEndExcluding": "4.14.237"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.13",
                                    "versionEndExcluding": "4.19.195"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.13",
                                    "versionEndExcluding": "5.4.126"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.13",
                                    "versionEndExcluding": "5.10.44"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.13",
                                    "versionEndExcluding": "5.12.11"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.13",
                                    "versionEndExcluding": "5.13"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/c7eab9e2d7b4e983ce280276fb920af649955897"
                },
                {
                    "url": "https://git.kernel.org/stable/c/42c10b0db064e45f5c5ae7019bbf2168ffab766c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/3e3c7ebbfac152d08be75c92802a64a1f6471a15"
                },
                {
                    "url": "https://git.kernel.org/stable/c/c3b6cf64dfe4ef96e7341508d50d6998da7062c7"
                },
                {
                    "url": "https://git.kernel.org/stable/c/72651c6579a25317a90536181d311c663d0329ab"
                },
                {
                    "url": "https://git.kernel.org/stable/c/476bdb04c501fc64bf3b8464ffddefc8dbe01577"
                }
            ],
            "title": "NFS: Fix use-after-free in nfs4_init_client()",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "title": "CISA ADP Vulnrichment",
                "metrics": [
                    {
                        "cvssV3_1": {
                            "scope": "UNCHANGED",
                            "version": "3.1",
                            "baseScore": 7.5,
                            "attackVector": "NETWORK",
                            "baseSeverity": "HIGH",
                            "vectorString": "CVSS:3.1/AV:N/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"
                        }
                    },
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2021-47259",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "total"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2024-05-22T16:41:04.603993Z"
                            }
                        }
                    }
                ],
                "affected": [
                    {
                        "cpes": [
                            "cpe:2.3:o:linux:linux_kernel:4.13:*:*:*:*:*:*:*"
                        ],
                        "vendor": "linux",
                        "product": "linux_kernel",
                        "versions": [
                            {
                                "status": "affected",
                                "version": "4.13"
                            }
                        ],
                        "defaultStatus": "unknown"
                    },
                    {
                        "cpes": [
                            "cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*"
                        ],
                        "vendor": "linux",
                        "product": "linux_kernel",
                        "versions": [
                            {
                                "status": "affected",
                                "version": "8dcbec6d20eb",
                                "lessThan": "476bdb04c501",
                                "versionType": "custom"
                            }
                        ],
                        "defaultStatus": "unknown"
                    }
                ],
                "problemTypes": [
                    {
                        "descriptions": [
                            {
                                "lang": "en",
                                "type": "CWE",
                                "cweId": "CWE-416",
                                "description": "CWE-416 Use After Free"
                            }
                        ]
                    }
                ],
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2024-06-04T17:14:09.514Z"
                }
            },
            {
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2024-08-04T05:32:07.994Z"
                },
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://git.kernel.org/stable/c/c7eab9e2d7b4e983ce280276fb920af649955897",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/42c10b0db064e45f5c5ae7019bbf2168ffab766c",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/3e3c7ebbfac152d08be75c92802a64a1f6471a15",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/c3b6cf64dfe4ef96e7341508d50d6998da7062c7",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/72651c6579a25317a90536181d311c663d0329ab",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/476bdb04c501fc64bf3b8464ffddefc8dbe01577",
                        "tags": [
                            "x_transferred"
                        ]
                    }
                ]
            }
        ]
    }
}