From e400322ef04999dfd58c444e622b6d7a8327e810 Mon Sep 17 00:00:00 2001 From: edef Date: Fri, 29 Jul 2022 21:22:49 +0000 Subject: ripple/minitrace: verify rt_sigaction sigsetsize strictly Change-Id: I053f3f261963d955b0e54b20e5cd42f81b3e6a57 --- ripple/minitrace/src/main.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ripple/minitrace/src/main.rs b/ripple/minitrace/src/main.rs index 01f7d18..952aaf1 100644 --- a/ripple/minitrace/src/main.rs +++ b/ripple/minitrace/src/main.rs @@ -478,6 +478,18 @@ fn check_syscall(entry: &SyscallEntry) -> bool { SyscallEntry::mprotect { addr, len, prot: _ } => { return addr % 4096 == 0 && len % 4096 == 0; } + SyscallEntry::rt_sigaction { + sig: _, + act: _, + oact: _, + sigsetsize, + } => { + if sigsetsize != 8 { + panic!( + "rt_sigaction(2) sigsetsize should be sizeof (sigset_t), actually {sigsetsize}" + ); + } + } SyscallEntry::access { ref filename, mode } => { println!("access({filename:?}, {mode:?})"); } -- cgit 1.4.1