{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-99696","id":"CVE-2026-99696","title":"Linux kernel memory corruption in OCFS2 xattr bucket defragmentation","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: find the xattr entry again after defragmenting a bucket\n\nocfs2_xattr_set_entry_bucket() hands loc.xl_entry to ocfs2_xa_set() twice:\nonce for the bucket as it stands, and, if that reports -ENOSPC, once more\nafter ocfs2_defrag_xattr_bucket() has packed the name/value pairs down.\n\nDefragmenting ends by sorting the entry array","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: find the xattr entry again after defragmenting a bucket\n\nocfs2_xattr_set_entry_bucket() hands loc.xl_entry to ocfs2_xa_set() twice:\nonce for the bucket as it stands, and, if that reports -ENOSPC, once more\nafter ocfs2_defrag_xattr_bucket() has packed the name/value pairs down.\n\nDefragmenting ends by sorting the entry array on xe_name_hash.  Buckets\nare kept sorted, so the sort only permutes entries that share a hash, but\nlib/sort.c is an unstable heapsort and it does permute them.  loc.xl_entry\nis an address inside xh_entries[], so afterwards it denotes whichever\nentry landed in that slot rather than the one the search found.\n\nThe second ocfs2_xa_set() then works on the wrong entry.  Nothing on that\npath compares the entry's name with xi->xi_name, so what happens depends\non how the two entries compare in size: ocfs2_xa_reuse_entry() trips its\nBUG_ON() when the padded name sizes differ, and otherwise the new value is\nwritten into the neighbouring attribute's value slot while the attribute\nbeing set is left untouched.  setxattr() reports success either way.\n\nRemember the entry's hash before defragmenting and look the entry up\nagain afterwards, the way ocfs2_xattr_bucket_find() does.  An entry that\ncannot be found again means the bucket no longer holds what the search\nfound, so fail with -EFSCORRUPTED rather than writing through the stale\npointer.","published":"2026-11-20T05:50:39.610Z","updated":"2026-11-20T05:50:39.610Z","reserved":"2026-09-25T10:25:14.429Z","status":"PUBLISHED","rejected":false,"assigner":"Linux","metric":null,"metrics":[],"rating":"unrated","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"012255961c9ecfe22b7a1df47ac26ab37818cb1e","lessThan":"b839d9913b56f0d769dced34cdfbe02a009b3bf1","status":"affected","versionType":"git"},{"version":"012255961c9ecfe22b7a1df47ac26ab37818cb1e","lessThan":"89ef9cb4da160b5572e0e5b9cf930335117d561b","status":"affected","versionType":"git"},{"version":"012255961c9ecfe22b7a1df47ac26ab37818cb1e","lessThan":"8c107f10fe63fdec081c2ae471fc90b4d3376db6","status":"affected","versionType":"git"},{"version":"012255961c9ecfe22b7a1df47ac26ab37818cb1e","lessThan":"9a40c050f58344615a0604701b5d299519833163","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.28","status":"affected"},{"version":"0","lessThan":"2.6.28","status":"unaffected","versionType":"semver"},{"version":"6.12.118","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.64","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.3.5","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc2","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":[],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/b839d9913b56f0d769dced34cdfbe02a009b3bf1","tags":[]},{"url":"https://git.kernel.org/stable/c/89ef9cb4da160b5572e0e5b9cf930335117d561b","tags":[]},{"url":"https://git.kernel.org/stable/c/8c107f10fe63fdec081c2ae471fc90b4d3376db6","tags":[]},{"url":"https://git.kernel.org/stable/c/9a40c050f58344615a0604701b5d299519833163","tags":[]}],"patchReferenced":false,"fixAvailable":false,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":null,"epssPercentile":null,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-99696","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99696","ok":false,"note":"not found"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-99696","ok":false,"note":"no open-source package data"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-99696","ok":false,"note":"no score yet"}],"aiTitle":true,"tech":[],"critical":[],"attention":null}