Seccomp generated SIGSYS has wrong return address if x0 = -513

Bug #1854574 reported by Timothy Baldwin
6
This bug affects 1 person
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-5.3.0-1007-aws 5.3.0-1007.8
ProcVersionSignature: User Name 5.3.0-1007.8-aws 5.3.7
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-0e88d70910be26319
Ec2AMIManifest: (unknown)
Ec2AvailabilityZone: eu-west-1b
Ec2InstanceType: a1.medium
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: linux-aws
UpgradeStatus: Upgraded to eoan on 2019-11-09 (21 days ago)

Revision history for this message
Timothy Baldwin (t-e-baldwin99) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.