Bug 379094

Summary: Valgrind reports INTERNAL ERROR in rt_sigsuspend syscall wrapper
Product: [Developer tools] valgrind Reporter: Ivo Raisr <ivosh>
Component: generalAssignee: Ivo Raisr <ivosh>
Status: RESOLVED FIXED    
Severity: crash CC: ivosh
Priority: NOR    
Version: 3.13 SVN   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: proposed patch

Description Ivo Raisr 2017-04-22 20:18:38 UTC
Valgrind reports INTERNAL ERROR when a bogus address is passed to rt_sigsuspend(mask) syscall wrapper.

That's because the syscall wrapper blindly passes mask (ARG1) to VG_(sigdelset)() which in turn dereferences ARG1. The syscall wrapper needs to check first if the memory can be safely dereferenced via
ML_(safe_to_deref)(ARG1, sizeof(vki_sigset_t)).
Comment 1 Ivo Raisr 2017-04-22 20:35:27 UTC
Created attachment 105151 [details]
proposed patch
Comment 2 Ivo Raisr 2017-04-25 06:45:53 UTC
Fixed in SVN r16311.
Comment 3 Ivo Raisr 2017-04-27 07:46:01 UTC
Follow up commit in SVN r16315 (fix mismerge from r16314).