Bug 2337120 (CVE-2024-48881) - CVE-2024-48881 kernel: bcache: revert replacing IS_ERR_OR_NULL with IS_ERR again
Summary: CVE-2024-48881 kernel: bcache: revert replacing IS_ERR_OR_NULL with IS_ERR again
Keywords:
Status: NEW
Alias: CVE-2024-48881
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-01-11 13:02 UTC by OSIDB Bzimport
Modified: 2025-02-01 14:42 UTC (History)
4 users (show)

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


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-01-11 13:02:57 UTC
In the Linux kernel, the following vulnerability has been resolved:

bcache: revert replacing IS_ERR_OR_NULL with IS_ERR again

Commit 028ddcac477b ("bcache: Remove unnecessary NULL point check in
node allocations") leads a NULL pointer deference in cache_set_flush().

1721         if (!IS_ERR_OR_NULL(c->root))
1722                 list_add(&c->root->list, &c->btree_cache);

>From the above code in cache_set_flush(), if previous registration code
fails before allocating c->root, it is possible c->root is NULL as what
it is initialized. __bch_btree_node_alloc() never returns NULL but
c->root is possible to be NULL at above line 1721.

This patch replaces IS_ERR() by IS_ERR_OR_NULL() to fix this.

Comment 1 Avinash Hanwate 2025-01-13 06:54:58 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025011121-CVE-2024-48881-c4e5@gregkh/T

Comment 3 Avinash Hanwate 2025-01-13 11:17:25 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025011121-CVE-2024-48881-c4e5@gregkh/T


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