[PATCH 1/3] x86/vdso: use kstrtouint() to validate vdso= boot parameter

From: Thorsten Blum

Date: Sun Jun 07 2026 - 11:19:12 EST


Replace the deprecated simple_strtoul() with kstrtouint() when parsing
the vdso= boot parameter.

simple_strtoul() accepts partial input and silently converts invalid
input to 0. Use kstrtouint() for strict input validation instead and
reject malformed input. Accept only 0 and 1; warn and disable vDSO
support otherwise.

kstrtouint() converts the input string directly to an unsigned int,
avoiding an implicit conversion when assigning to vdso64_enabled.

Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
---
arch/x86/entry/vdso/vma.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c
index d903bce24f15..b45549cd7acf 100644
--- a/arch/x86/entry/vdso/vma.c
+++ b/arch/x86/entry/vdso/vma.c
@@ -270,7 +270,11 @@ bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs)
#ifdef CONFIG_X86_64
static __init int vdso_setup(char *s)
{
- vdso64_enabled = simple_strtoul(s, NULL, 0);
+ if (kstrtouint(s, 0, &vdso64_enabled) || vdso64_enabled > 1) {
+ pr_warn("vdso= values other than 0 and 1 are invalid; vdso disabled\n");
+ vdso64_enabled = 0;
+ }
+
return 1;
}
__setup("vdso=", vdso_setup);