Bug 2360196 (CVE-2024-58094) - CVE-2024-58094 kernel: jfs: add check read-only before truncation in jfs_truncate_nolock()
Summary: CVE-2024-58094 kernel: jfs: add check read-only before truncation in jfs_trun...
Keywords:
Status: NEW
Alias: CVE-2024-58094
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-04-16 15:02 UTC by OSIDB Bzimport
Modified: 2025-04-17 16:12 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-04-16 15:02:07 UTC
In the Linux kernel, the following vulnerability has been resolved:

jfs: add check read-only before truncation in jfs_truncate_nolock()

Added a check for "read-only" mode in the `jfs_truncate_nolock`
function to avoid errors related to writing to a read-only
filesystem.

Call stack:

block_write_begin() {
  jfs_write_failed() {
    jfs_truncate() {
      jfs_truncate_nolock() {
        txEnd() {
          ...
          log = JFS_SBI(tblk->sb)->log;
          // (log == NULL)

If the `isReadOnly(ip)` condition is triggered in
`jfs_truncate_nolock`, the function execution will stop, and no
further data modification will occur. Instead, the `xtTruncate`
function will be called with the "COMMIT_WMAP" flag, preventing
modifications in "read-only" mode.

Comment 1 Avinash Hanwate 2025-04-17 16:06:17 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025041652-CVE-2024-58094-b87b@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.