{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2023-54187",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2023-54187"
  ],
  "published": "2025-12-30T12:09:43Z",
  "summary": "f2fs: fix potential corruption when moving a directory",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: fix potential corruption when moving a directory\n\nF2FS has the same issue in ext4_rename causing crash revealed by\nxfstests/generic/707.\n\nSee also commit 0813299c586b (\"ext4: Fix possible corruption when moving a directory\")",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.21-1+rpt1"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v6",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v7",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v7l",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v8",
            "binary_version": "1:6.1.21-1+rpt1"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.21-1+rpt1": {
            "linux_commit": "0afb5e98488aed7017b9bf321b575d0177feb7ed",
            "upstream_version": "6.1.21",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.29"
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2023-54187"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/3e77036246123ff710fa2661dcaa12a45284f09b"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/957904f531fd857a92743b11fbc9c9ffdf7f3207"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/8f57f3e112cf1d16682b6ff9c31c72f40f7da9c9"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/8a0b544b7caedfbc05065b6377fd1d8bf7ef5e70"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/f20191100952013f0916418cdaed0ab55c7b634c"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/0a76082a4a32a90d1ef33dee8b400efc082b4b6f"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d94772154e524b329a168678836745d2773a6e02"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:24:39Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The vulnerability is reached through the ordinary rename()/renameat2() syscall on a locally mounted f2fs filesystem, requiring local system access. No network protocol handler is involved.\nAC:L - The attacker controls both sides of the race \u2014 one thread issues the cross-directory rename while another creates entries in the moved directory to force inline-to-normal dentry conversion \u2014 and the unprotected window spans f2fs_balance_fs() (which can run GC and block for a long time), f2fs_lock_op() and f2fs_add_link(), making it wide and retryable indefinitely.\nPR:L - Any unprivileged local user with write access to two directories on an f2fs mount can trigger this; on Android every app has writable directories on the f2fs /data partition, and inline_dentry is enabled by default in default_options().\nUI:N - The attacker performs both the rename and the concurrent directory-modifying operations itself; no victim action is needed on an already-mounted filesystem.\nS:U - The corruption stays within the kernel/filesystem security authority; there is no crossing into a hypervisor, IOMMU, or other separate security scope.\nC:H - The stale write lands inside the inode's i_addr[] block-address array, planting an attacker-influenced physical block number into the directory, so subsequent readdir/lookup reads and exposes disk blocks belonging to other users' files.\nI:H - This is persistent on-disk metadata corruption \u2014 an attacker-influenced 32-bit value is written into a directory inode's block pointer and marked dirty, causing later directory writes to overwrite blocks owned by other files and producing double-allocated blocks requiring fsck.\nA:H - The commit states the race causes a crash (reproduced by xfstests/generic/707), and the resulting mismatched page-type writeback wait can hang under the page lock while the corrupted metadata triggers -EFSCORRUPTED/SBI_NEED_FSCK filesystem shutdown."
    }
  }
}
