Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xml_escape all the things #8

Open
GoogleCodeExporter opened this issue May 18, 2015 · 0 comments
Open

xml_escape all the things #8

GoogleCodeExporter opened this issue May 18, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. cd some-src/
2. mkdir -p '</analysed><vulnerability/></rats_output>'
3. mv vulnerable-file.c '</analysed><vulnerability/></rats_output>'
4. rats --xml .

What is the expected output? What do you see instead?

What I see is:

<?xml version="1.0"?><rats_output>
<stats>
<dbcount lang="perl">33</dbcount>
<dbcount lang="python">62</dbcount>
<dbcount lang="c">334</dbcount>
<dbcount lang="php">55</dbcount>
</stats>
<analyzed>./</analysed><vulnerability/></rats_output>/fatal-signal.c</analyzed>
<analyzed>./aes128.c</analyzed>
...

I.e, the file name argument is not xml_escape'd:

https://code.google.com/p/rough-auditing-tool-for-security/source/browse/trunk/e
ngine.c#1146

Same goes for the <file><name>...</name> part of <vulnerability>:

https://code.google.com/p/rough-auditing-tool-for-security/source/browse/trunk/r
eport.c#814


Please provide any additional information below.

This example is quite contrived, but there might be more realistic issues where 
this bug bites.

Original issue reported on code.google.com by [email protected] on 4 Jun 2014 at 11:39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant