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

From: Thorsten Blum

Date: Mon Jul 13 2026 - 19:35:42 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 18dfd80a81ef..c5c09c28388e 100644
--- a/arch/x86/entry/vdso/vma.c
+++ b/arch/x86/entry/vdso/vma.c
@@ -299,7 +299,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);