Bug 378535

Summary: Valgrind reports INTERNAL ERROR in execve syscall wrapper
Product: [Developer tools] valgrind Reporter: Ivo Raisr <ivosh>
Component: generalAssignee: Ivo Raisr <ivosh>
Status: RESOLVED FIXED    
Severity: normal 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-07 11:52:52 UTC
Valgrind reports INTERNAL ERROR when a bogus address is passed to execve(argv) or execve(envp) syscall wrapper.

That's because ML_(pre_argv_envp)() blindly dereferences address passed by the client program. The syscall wrapper should check at least that the first entry of argv and envp belongs to a valid client memory segment (there needs to be always at least one entry for terminating NULL).
Comment 1 Ivo Raisr 2017-04-07 11:54:13 UTC
Created attachment 104915 [details]
proposed patch
Comment 2 Ivo Raisr 2017-04-10 20:36:23 UTC
Fixed in SVN r16301.