]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commit
xen/ubsan: Fix UB in type_descriptor declaration
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 17 Jun 2024 17:40:32 +0000 (18:40 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 18 Jun 2024 13:55:04 +0000 (14:55 +0100)
commitbd59af99700f075d06a6d47a16f777c9519928e0
tree1ef96dc9323981a6817b7bd776651fbbac45b3ec
parent369558924a642bbb0cb731e9a3375958867cb17b
xen/ubsan: Fix UB in type_descriptor declaration

struct type_descriptor is arranged with a NUL terminated string following the
kind/info fields.

The only reason this doesn't trip UBSAN detection itself (on more modern
compilers at least) is because struct type_descriptor is only referenced in
suppressed regions.

Switch the declaration to be a real flexible member.  No functional change.

Fixes: 00fcf4dd8eb4 ("xen/ubsan: Import ubsan implementation from Linux 4.13")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
xen/common/ubsan/ubsan.h