Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arch: arm: userspace: fix syscall ID validation #23535

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion arch/arm/core/swap_helper.S
Expand Up @@ -411,7 +411,10 @@ _do_syscall:
/* validate syscall limit */
ldr ip, =K_SYSCALL_LIMIT
cmp r6, ip
blt valid_syscall_id
/* The supplied syscall_id must be lower than the limit
* (Requires unsigned integer comparison)
*/
blo valid_syscall_id

/* bad syscall id. Set arg1 to bad id and set call_id to SYSCALL_BAD */
str r6, [r0, #0]
Expand Down