Bug 378535 - Valgrind reports INTERNAL ERROR in execve syscall wrapper
Summary: Valgrind reports INTERNAL ERROR in execve 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 normal
Target Milestone: ---
Assignee: Ivo Raisr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-07 11:52 UTC by Ivo Raisr
Modified: 2017-04-10 20:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
proposed patch (155.02 KB, patch)
2017-04-07 11:54 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-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.