[LLVMbugs] [Bug 14328] New: Rewriter::overwriteChangedFiles() extremely dangerous when running as root.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Nov 13 15:10:20 PST 2012


http://llvm.org/bugs/show_bug.cgi?id=14328

             Bug #: 14328
           Summary: Rewriter::overwriteChangedFiles() extremely dangerous
                    when running as root.
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: morgon.kanter at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


I've been using clang's Rewriter to perform source-to-source transforms on
specific source files. If a rewrite changes (accidentally or otherwise) a
system include file, and you call overwriteChangedFiles(), and you have write
permission, the include file will be modified. I believe this is rarely desired
behavior, and it is performed silently.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list