Skip to content
Heist/ feed
Unrated

ceph: fix crash after fscrypt_encrypt_pagecache_blocks() error

Type: advisorySource: Official CVE List1 source record

In the Linux kernel, the following vulnerability has been resolved: ceph: fix crash after fscrypt_encrypt_pagecache_blocks() error The function move_dirty_folio_in_page_array() was created by commit ce80b76dd327 ("ceph: introduce ceph_process_folio_batch() method") by moving code from ceph_writepages_start() to this function. This new function is supposed to return an error code which is checked by the caller (now ceph_process_folio_batch()), and on error, the caller invokes redirty_page_for_writepage() and then breaks from the loop. However, the refactoring commit has gone wrong, and it by accident, it always returns 0 (= success) because it first NULLs the pointer and then returns PTR_ERR(NULL) which is always 0. This means errors are silently ignored, leaving NULL entries in the page array, which may later crash the kernel. The simple solution is to call PTR_ERR() before clearing the pointer.

Announced Source revision 1
Original source ↗

CVE-2025-39878

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2025-39878

Linux

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Linux

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "0f2b2b7cacf888229cec19126e6791b11fb35f32",
        "lessThan": "4a918f04cf97b2436a8dfe5cb51bb33f8e8831f4",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "ce80b76dd32764cc914975777e058d4fae4f0ea0",
        "lessThan": "dd1616ecbea920d228c56729461ed223cc501425",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "ce80b76dd32764cc914975777e058d4fae4f0ea0",
        "lessThan": "249e0a47cdb46bb9eae65511c569044bd8698d7d",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "fs/ceph/addr.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "6.15"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "6.15",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "6.16.8",
        "versionType": "semver",
        "lessThanOrEqual": "6.16.*"
      },
      {
        "status": "unaffected",
        "version": "6.17",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "fs/ceph/addr.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2025-39878

Source reference: /cveMetadata/cveId

Publisher severity

No explicit severity was provided.

Event
#46027 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement