Bug 379094 - Valgrind reports INTERNAL ERROR in rt_sigsuspend syscall wrapper
Summary: Valgrind reports INTERNAL ERROR in rt_sigsuspend syscall wrapper
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.13 SVN
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Ivo Raisr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-22 20:18 UTC by Ivo Raisr
Modified: 2017-04-27 07:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
proposed patch (3.40 KB, patch)
2017-04-22 20:35 UTC, Ivo Raisr
Details

Note You need to log in before you can comment on or make changes to this bug.
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).