In the Linux kernel, the following vulnerability has been resolved:
net: mdio: fix undefined behavior in bit shift for _mdiobusregister
Shifting signed 32-bit value by 31 bits is undefined, so changing significant bit to unsigned. The UBSAN warning calltrace like below:
UBSAN: shift-out-of-bounds in drivers/net/phy/mdiobus.c:586:27 left shift of 1 by 31 places cannot be represented in type 'int' Call Trace: <TASK> dumpstacklvl+0x7d/0xa5 dumpstack+0x15/0x1b ubsanepilogue+0xe/0x4e _ubsanhandleshiftoutofbounds+0x1e7/0x20c _mdiobusregister+0x49d/0x4e0 fixedmdiobusinit+0xd8/0x12d dooneinitcall+0x76/0x430 kernelinitfreeable+0x3b3/0x422 kernelinit+0x24/0x1e0 retfrom_fork+0x1f/0x30 </TASK>