From 73c38454383e0daeb72d08b990e49bf4bd42ba87 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 18 Dec 2019 14:44:12 +0100 Subject: pkg/compiler: fix incorrect alignment calculation for padding We assumed that for ConstType alignment is equal to size, which is perfectly reasonable for normal int8/16/32/64/ptr. However, padding is also represented by ConstType of arbitrary size, so if we added 157 bytes of padding that becomes alignment of the padding field and as the result of the whole struct. This affects very few structs, but quite radically and quite important structs. Discovered thanks to syz-check. Update #590 --- sys/linux/dev_kvm.txt.warn | 3 --- 1 file changed, 3 deletions(-) (limited to 'sys/linux/dev_kvm.txt.warn') diff --git a/sys/linux/dev_kvm.txt.warn b/sys/linux/dev_kvm.txt.warn index aabe7bef6..d9e7a02e1 100644 --- a/sys/linux/dev_kvm.txt.warn +++ b/sys/linux/dev_kvm.txt.warn @@ -54,8 +54,5 @@ field kvm_fpu.pad1: bad offset: syz=132 kernel=133 struct kvm_irq_chip: no corresponding struct in kernel struct kvm_ioapic_redir: no corresponding struct in kernel struct kvm_mce_cap: no corresponding struct in kernel -struct kvm_nested_state: bad size: syz=288 kernel=128 -field kvm_nested_state.hdr: bad offset: syz=96 kernel=8 -field kvm_nested_state.data: bad offset: syz=216 kernel=128 struct kvm_nested_state_arg: no corresponding struct in kernel struct kvm_vmx_nested_state: no corresponding struct in kernel -- cgit mrf-deployment