-
With CONFIG_DEBUG_RSEQ=y, at rseq registration the read-only fields are copied from user-space, if this copy fails the syscall returns -EFAULT and the registration should not be activated - but it erroneously is. Move the activation of the registration after the copy of the fields to fix this bug. Fixes: 7d5265ff ("rseq: Validate read-only fields under DEBUG_RSEQ config") Signed-off-by:
Michael Jeanson <mjeanson@efficios.com> Signed-off-by:
Ingo Molnar <mingo@kernel.org> Reviewed-by:
Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/r/20250219205330.324770-1-mjeanson@efficios.com
With CONFIG_DEBUG_RSEQ=y, at rseq registration the read-only fields are copied from user-space, if this copy fails the syscall returns -EFAULT and the registration should not be activated - but it erroneously is. Move the activation of the registration after the copy of the fields to fix this bug. Fixes: 7d5265ff ("rseq: Validate read-only fields under DEBUG_RSEQ config") Signed-off-by:
Michael Jeanson <mjeanson@efficios.com> Signed-off-by:
Ingo Molnar <mingo@kernel.org> Reviewed-by:
Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/r/20250219205330.324770-1-mjeanson@efficios.com