[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [kernel-6.5-bug] with xen-4.18~rc4 on ub-24.04 noble, booting xen domU shows UBSAN errors in blkback & netback drivers



 looking at a bookworm domU, tried linux-image-6.5.0-0.deb12.1-amd64 from bookworm-backports in the ub-24.04 dom0, no such UBSAN errors.

Going to request a build of kernel-6.5 in Noble with
 # CONFIG_UBSAN is not set

their kernel config has:
CONFIG_UBSAN=y
# CONFIG_UBSAN_TRAP is not set
CONFIG_CC_HAS_UBSAN_BOUNDS_STRICT=y
CONFIG_UBSAN_BOUNDS=y
CONFIG_UBSAN_BOUNDS_STRICT=y
CONFIG_UBSAN_SHIFT=y
# CONFIG_UBSAN_DIV_ZERO is not set
CONFIG_UBSAN_BOOL=y
CONFIG_UBSAN_ENUM=y
# CONFIG_UBSAN_ALIGNMENT is not set
CONFIG_UBSAN_SANITIZE_ALL=y
# CONFIG_TEST_UBSAN is not set

On Mon, Nov 6, 2023 at 1:15 PM Pry Mar <pryorm09@xxxxxxxxx> wrote:
Similar trouble in domU, independent of the dom0 kernel:

[    0.605954] UBSAN: array-index-out-of-bounds in /build/linux-D15vQj/linux-6.5.0/drivers/block/xen-blkfront.c:1544:3
[    0.605962] index 1 is out of range for type 'blkif_sring_entry [1]'
[    0.605968] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 6.5.0-9-generic #9-Ubuntu

[    4.021091] UBSAN: array-index-out-of-bounds in /build/linux-D15vQj/linux-6.5.0/drivers/net/xen-netfront.c:413:4
[    4.021100] index 1 is out of range for type 'xen_netif_tx_sring_entry [1]'
[    4.021114] CPU: 3 PID: 1 Comm: systemd Not tainted 6.5.0-9-generic #9-Ubuntu

[ 1288.106524] UBSAN: array-index-out-of-bounds in /build/linux-D15vQj/linux-6.5.0/drivers/net/xen-netfront.c:807:4
[ 1288.106533] index 137 is out of range for type 'xen_netif_tx_sring_entry [1]'
[ 1288.106540] CPU: 0 PID: 320 Comm: sshd Not tainted 6.5.0-9-generic #9-Ubuntu

domU is giving far more trace output.
On Mon, Nov 6, 2023 at 11:20 AM Pry Mar <pryorm09@xxxxxxxxx> wrote:
Hello,

These 2 errors show in dmesg late in boot process when xen domU launch:
1)  blkback
UBSAN: array-index-out-of-bounds in /build/linux-D15vQj/linux-6.5.0/drivers/block/xen-blkback/blkback.c:1227:4

2) netback
[   55.209063] UBSAN: array-index-out-of-bounds in /build/linux-D15vQj/linux-6.5.0/drivers/net/xen-netback/netback.c:289:3
[   55.209268] index 3 is out of range for type 'xen_netif_tx_sring_entry [1]'
[   55.209401] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 6.5.0-9-generic #9-Ubuntu

The xen sources don't seem to generate these UBSAN errors and I included the patch from staging-4.18. It seems only the xen related kernel drivers are
doing UBSAN errors.

BTW the dom0 works fine. The xen-4.18~rc4 debian delta was a forward port from Jammy.

cheers,
PryMar56
##xen-packaging on OFTC


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.