Ticket #3910 (closed bug: fixed)
+RTS options introduce a security problem for, e.g., setuid binaries
| Reported by: | andersk | Owned by: | simonmar |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.0.2 |
| Component: | Runtime System | Version: | 7.1 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Incorrect result at runtime | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
The fact that every ghc-compiled program accepts +RTS options could be a security problem in several contexts. For example, if you compile a “Hello, world!” program and make it setuid root, any user can now overwrite any file on the system using root privileges: hello +RTS -t/etc/passwd.
The GHCRTS environment variable has the same problem.
One should not need to have to know about these obscure features to write a secure program that accepts untrusted arguments.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

