{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2025-21830",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2025-21830"
  ],
  "published": "2025-03-06T16:09:07Z",
  "summary": "landlock: Handle weird files",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nlandlock: Handle weird files\n\nA corrupted filesystem (e.g. bcachefs) might return weird files.\nInstead of throwing a warning and allowing access to such file, treat\nthem as regular files.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.129",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2025-21830"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/a1fccf6b72b56343dd4f2d96b008147f9951eebd"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/7d6121228959ddf44a4b9b6a177384ac7854e2f9"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/39bb3d56f1c351e76bb18895d0e73796e653d5c1"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/2569e65d2eb6ac1afe6cb6dfae476afee8b6771a"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/0fde195a373ab1267e60baa9e1a703a97e7464cd"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/49440290a0935f428a1e43a5ac8dc275a647ff80"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T12:19:11Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.3,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The vulnerable code is reached only via local `renameat2(2)`/`linkat(2)` on an inode backed by a mounted crafted filesystem image, plus local Landlock syscalls to establish the domain. No network-facing consumer exists \u2014 NFS, SMB and FUSE clients all normalize or reject the invalid `S_IFMT` values before they reach an inode.\nAC:L - The attacker crafts the bcachefs/JFS/HFS+ image containing the weird-mode inode and drives the rename himself from a self-created Landlock domain, so the trigger is deterministic with no race, timing, or memory-layout dependency.\nPR:L - `landlock_create_ruleset()`/`landlock_restrict_self()` require no capability at all, and an ordinary desktop/kiosk console user can get an attacker-supplied image mounted through udisks2 removable-media automount without root; only a local unprivileged account is needed.\nUI:N - The attacker performs the entire sequence \u2014 supply the image, self-sandbox with Landlock, issue the rename or link \u2014 with no action required from another user.\nS:C - The fail-open `return 0` bypasses the Landlock sandbox boundary, letting a confined process act on filesystem resources that the sandbox policy placed under a separate security authority, consistent with the `S:C` treatment of the analogous Landlock refer-path bypass in CVE-2025-68736.\nC:N - No memory is read out of bounds and no kernel data is exposed; the anti-right-widening logic in `collect_domain_accesses()` uses the full `LANDLOCK_MASK_ACCESS_FS` and is unaffected, so no read rights are gained.\nI:L - Dropping the `LANDLOCK_ACCESS_FS_MAKE_*` requirement lets a sandboxed process create, link, or relocate weird-typed files into directories the policy protects, but the bypass is confined to same-mount operations on corrupt inodes and DAC still applies, so the unauthorized modification is limited.\nA:H - The path hits `WARN_ON_ONCE(1)`, which panics the kernel outright when `panic_on_warn` is set \u2014 the configuration under which syzbot reported this \u2014 giving a full denial of service."
    }
  }
}
