CVE-2026-45960
Beschrijving NL
In de Linux kernel is de volgende kwetsbaarheid verholpen:
hfsplus: retourfout wanneer knooppunt al bestaat in hfs_bnode_create
Wanneer hfs_bnode_create() vaststelt dat een knooppunt al gehasht is (wat
gebeurt niet in normale werking), het retourneert momenteel het bestaande knooppunt
zonder het aantal referenties te verhogen. Dit veroorzaakt een referentietelling
inconsistentie die leidt tot een kernel panic wanneer het knooppunt later wordt bevrijd
in hfs_bnode_put():
kernelbug bij fs/hfsplus/bnode.c:676! BUG_ON(!atomic_read(&node->refcnt))
Dit scenario kan optreden wanneer hfs_bmap_alloc() probeert een knooppunt toe te wijzen
die al in gebruik is (bijv. wanneer de bitmapbit van knooppunt 0 onjuist is
niet ingesteld), of als gevolg van beschadiging van het bestandssysteem. Het retourneren van een bestaand knooppunt vanuit een aanmaakpad is geen normale werking. Los dit op door ERR_PTR(-EEXIST) te retourneren in plaats van het knooppunt wanneer het
al gehasht. Dit signaleert de foutconditie goed aan bellers,
die al controleren op IS_ERR() -retourwaarden.
Origineel (Engels) tonen
In the Linux kernel, the following vulnerability has been resolved:
hfsplus: return error when node already exists in hfs_bnode_create
When hfs_bnode_create() finds that a node is already hashed (which should
not happen in normal operation), it currently returns the existing node
without incrementing its reference count. This causes a reference count
inconsistency that leads to a kernel panic when the node is later freed
in hfs_bnode_put():
kernel BUG at fs/hfsplus/bnode.c:676!
BUG_ON(!atomic_read(&node->refcnt))
This scenario can occur when hfs_bmap_alloc() attempts to allocate a node
that is already in use (e.g., when node 0's bitmap bit is incorrectly
unset), or due to filesystem corruption.
Returning an existing node from a create path is not normal operation.
Fix this by returning ERR_PTR(-EEXIST) instead of the node when it's
already hashed. This properly signals the error condition to callers,
which already check for IS_ERR() return values.