]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ARM: xen: validate hypervisor compatible before parsing its version
authorPengpeng Hou <pengpeng@iscas.ac.cn>
Sun, 5 Apr 2026 00:42:00 +0000 (08:42 +0800)
committerJuergen Gross <jgross@suse.com>
Fri, 10 Apr 2026 08:45:42 +0000 (10:45 +0200)
commitf45ab27774aadeee28f093a9f074892e9bebb586
tree1e7768304f5d9e427d7039b5565b330fd6b56ead
parent591cd656a1bf5ea94a222af5ef2ee76df029c1d2
ARM: xen: validate hypervisor compatible before parsing its version

fdt_find_hyper_node() reads the raw compatible property and then derives
hyper_node.version from a prefix match before later printing it with %s.
Flat DT properties are external boot input, and this path does not prove
that the first compatible entry is NUL-terminated within the returned
property length.

Keep the existing flat-DT lookup path, but verify that the first
compatible entry terminates within the returned property length before
deriving the version suffix from it.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
Message-ID: <20260405094005.5-arm-xen-v2-pengpeng@iscas.ac.cn>
arch/arm/xen/enlighten.c