Seccomp generated SIGSYS has wrong return address if x0 = -513
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-aws (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
The seccomp man page states the for signals generated by SECCOMP_RET_TRAP, "The program counter will be as though the system call happened (i.e., the program counter will not point to the system call instruction)."
However if x0 (first argument and return value) contains the value -513 (-ERESTARTNOINTR), or if SA_RESTART is enabled on the signal handler and x0 contains -512 (-ERESTARTSYS) the saved program counter value points to the system call instruction.
I can reproduce this bug on upstream AArch32 kernels, but not on current x86-64 kernels.
ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: linux-image-
ProcVersionSign
Uname: Linux 5.3.0-1007-aws aarch64
ApportVersion: 2.20.11-0ubuntu8.2
Architecture: arm64
Date: Sat Nov 30 14:10:31 2019
Ec2AMI: ami-0e88d70910b
Ec2AMIManifest: (unknown)
Ec2Availability
Ec2InstanceType: a1.medium
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=C.UTF-8
SHELL=/bin/bash
SourcePackage: linux-aws
UpgradeStatus: Upgraded to eoan on 2019-11-09 (21 days ago)