{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2021-47066",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-02-29T22:33:44.296Z",
        "datePublished": "2024-02-29T22:37:39.917Z",
        "dateUpdated": "2026-08-05T08:45:48.517Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T08:45:48.517Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nasync_xor: increase src_offs when dropping destination page\n\nNow we support sharing one page if PAGE_SIZE is not equal stripe size. To\nsupport this, it needs to support calculating xor value with different\noffsets for each r5dev. One offset array is used to record those offsets.\n\nIn RMW mode, parity page is used as a source page. It sets\nASYNC_TX_XOR_DROP_DST before calculating xor value in ops_run_prexor5.\nSo it needs to add src_list and src_offs at the same time. Now it only\nneeds src_list. So the xor value which is calculated is wrong. It can\ncause data corruption problem.\n\nI can reproduce this problem 100% on a POWER8 machine. The steps are:\n\n  mdadm -CR /dev/md0 -l5 -n3 /dev/sdb1 /dev/sdc1 /dev/sdd1 --size=3G\n  mkfs.xfs /dev/md0\n  mount /dev/md0 /mnt/test\n  mount: /mnt/test: mount(2) system call failed: Structure needs cleaning."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H",
                        "baseScore": 7.1,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The bug sits in local MD RAID5 XOR (`async_xor_offs` via `ops_run_prexor5`), reached through ordinary block I/O writes to a RAID5 array, not through network-protocol or packet processing.\nAC:L - On affected deployments (e.g. POWER/ARM64 with 64K pages where stripe pages are shared), RMW prexor hits the sync DROP_DST path and the bad XOR is reproducible 100% with normal writes; no attacker-uncontrollable race is required.\nPR:L - Creating the array needs CAP_SYS_ADMIN, but once a RAID5 filesystem is mounted, an unprivileged user with write access triggers RMW/prexor through ordinary file writes.\nUI:N - The attacker triggers the bug by writing their own data; no separate victim action such as mounting or opening a crafted file is required.\nS:U - Impact stays within the local kernel/storage authority (corrupt RAID parity/data on that host); there is no VM escape, IOMMU bypass, or other cross-boundary effect.\nC:N - Wrong `src_offs` only mis-selects in-page RAID stripe buffers for XOR; there is no OOB/UAF read or other disclosure of unrelated kernel or user memory.\nI:H - Incorrect parity from the broken XOR causes persistent RAID5 data corruption (filesystem contents/metadata can be destroyed, as in the reported unmountable XFS case).\nA:H - The resulting corruption can render the filesystem unusable (e.g. mount fails with \"Structure needs cleaning\"), fully denying access to the stored volume."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "crypto/async_tx/async_xor.c"
                    ],
                    "versions": [
                        {
                            "version": "29bcff787a2593b2126cfaff612c0b4e560022e9",
                            "lessThan": "cab2e8e5997b592fdb7d02cf2387b4b8e3057174",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "29bcff787a2593b2126cfaff612c0b4e560022e9",
                            "lessThan": "29ffa50f33de824b5491f8239c88c4a0efdd03af",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "29bcff787a2593b2126cfaff612c0b4e560022e9",
                            "lessThan": "53f8208e11abd6dde9480dfcb97fecdb1bc2ac18",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "29bcff787a2593b2126cfaff612c0b4e560022e9",
                            "lessThan": "ceaf2966ab082bbc4d26516f97b3ca8a676e2af8",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "crypto/async_tx/async_xor.c"
                    ],
                    "versions": [
                        {
                            "version": "5.10",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.10",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.37",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.11.21",
                            "lessThanOrEqual": "5.11.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.12.4",
                            "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": "5.10",
                                    "versionEndExcluding": "5.10.37"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.10",
                                    "versionEndExcluding": "5.11.21"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.10",
                                    "versionEndExcluding": "5.12.4"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.10",
                                    "versionEndExcluding": "5.13"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/cab2e8e5997b592fdb7d02cf2387b4b8e3057174"
                },
                {
                    "url": "https://git.kernel.org/stable/c/29ffa50f33de824b5491f8239c88c4a0efdd03af"
                },
                {
                    "url": "https://git.kernel.org/stable/c/53f8208e11abd6dde9480dfcb97fecdb1bc2ac18"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ceaf2966ab082bbc4d26516f97b3ca8a676e2af8"
                }
            ],
            "title": "async_xor: increase src_offs when dropping destination page",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "title": "CISA ADP Vulnrichment",
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2021-47066",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2024-03-01T15:52:02.729443Z"
                            }
                        }
                    }
                ],
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2024-06-04T17:15:26.731Z"
                }
            },
            {
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2024-08-04T05:24:39.523Z"
                },
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://git.kernel.org/stable/c/cab2e8e5997b592fdb7d02cf2387b4b8e3057174",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/29ffa50f33de824b5491f8239c88c4a0efdd03af",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/53f8208e11abd6dde9480dfcb97fecdb1bc2ac18",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/ceaf2966ab082bbc4d26516f97b3ca8a676e2af8",
                        "tags": [
                            "x_transferred"
                        ]
                    }
                ]
            }
        ]
    }
}