| Summary: | net-misc/rdist noexec option broken-- looks for a.out, not ELF binaries | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | splite <splite-gentoo> |
| Component: | Current packages | Assignee: | Gentoo TreeCleaner Project <treecleaner> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | agriffis, maintainer-needed, security |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | Vote | ||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
patch to rdist-6.1.5-r1.ebuild to fix noexec option, plus bonus stuff
patch to rdist-6.1.5-r1.ebuild patch to fix insecure mktemp use; put it in ${FILESDIR}/rdist_mkstemp.patch |
||
|
Description
splite
2004-10-08 08:16:44 UTC
Created attachment 41367 [details, diff]
patch to rdist-6.1.5-r1.ebuild to fix noexec option, plus bonus stuff
Here's a new patch that fixes a couple more problems: an insecure use of mktemp(3) and a segfault on 64-bit machines while trying to print an error message. It also changes the mention of a.out in the man page to ELF. Created attachment 49049 [details, diff]
patch to rdist-6.1.5-r1.ebuild
Created attachment 49051 [details, diff]
patch to fix insecure mktemp use; put it in ${FILESDIR}/rdist_mkstemp.patch
This is the only open bug, but dead upstream (alpha release in 2001). I am unsure if other distros have dropped it yet, but I don't know of anyone still using it. I haven't tried said patch (or the alpha available from the upstream). Security, looks like this package may use mktemp insecurely, can someone please double check for me? I'd like to punt it in either case, but I want a GLSA if one is necessary. Thanks. (In reply to comment #6) > Security, looks like this package may use mktemp insecurely, can someone please > double check for me? I'd like to punt it in either case, but I want a GLSA if > one is necessary. > > Thanks. > only rdistvf.pl contains a weakness that can empty/override an arbitrary file with the rights of the user calling rdistvf.pl . But that file is never used, AFAIK. $tmp = "/tmp/rdistfilter.$$"; open(OUTF, "|sort >$tmp") || die "Can not open tmp file.\n"; These two lines are not exploitable: (void) mktemp(msgfac->mf_filename); if ((msgfac->mf_fptr = fopen(msgfac->mf_filename, "w"))==NULL) except if someone could create the "mf_filename" file between the mktemp() call and the fopen() call.... hard... But i agree with the patch, the newer version is the good way to handle mktemp. +1 for removal. Thanks, fixed. |