Descrizione
In the Linux kernel, the following vulnerability has been resolved:
fs/jfs: Add check for negative db_l2nbperpage
l2nbperpage is log2(number of blks per page), and the minimum legal
value should be 0, not negative.
In the case of l2nbperpage being negative, an error will occur
when subsequently used as shift exponent.
Syzbot reported this bug:
UBSAN: shift-out-of-bounds in fs/jfs/jfs_dmap.c:799:12
shift exponent -16777216 is negative
Tipo di vulnerabilità
CWE-1335
Incorrect Bitwise Shift of Integer
An integer value is specified to be shifted by a negative amount or an amount greater than or equal to the number of bits contained in the value.
Impatto sui sistemi
| Ambito | Impatto |
| Integrità |
Interruzione del servizio: arresto o riavvio |
| Altro |
Comportamento indefinito, Stato imprevisto, Alterare la logica di esecuzione |
Come si previene
Sviluppo
Implicitly or explicitly add checks and mitigation for negative or over-shift values.
Tutte le 5 CVE di tipo CWE-1335, con andamento e prevenzione