-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add fix for xml entities not working #3112
Conversation
@zimri-leisher can you provide an example of the external file? I can see how to import entities, but not how to define them. |
Looks like it is a copy-paste mechanism. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed that this functionally works. I have asked @bitWarrior to weigh-in on the security considerations.
I provided an example in the issue, I think. Let me know if that's not sufficient |
XML external entity processing is disabled by default to protect against XML External Entity (XXE) attacks which can allow an adversary to execute remote code and/or access internal memory by inserting malicious code in the entity field of an XML file. Although it could be argued the probability of an XXE attack against an F' deployment would require a sophisticated attacker (for obvious reasons I will not detail how it could be done), my option is the probability and negative impact of an XXE attack against an F' deployment is serious enough to keep F's default XML entity protection. I need to know more about the implementation and the functionality that is required that this issue is requesting, but below are my recommendations that may, or may not be applicable:
|
A few comments:
In response to your recommendations:
I believe the best option is: |
To follow up my comment, I want to be clear that I share your security concerns and agree that having a common and easily preventable vulnerability in F Prime is awful! However, I don't think that allowing the feature of XML entities means that we introduce the vulnerability. As far as I can tell, XXE is a web-focused vuln in servers that expose XML parsers to users. The very nature of the F Prime project makes it unlikely to ever be considered as an attack vector. |
We are working on adding packet specification to the FPP model. Thus long term this will not be an issue. It is not JSON, but it is something. My favorite is option 5 above. To that end, I see several possible paths forward:
With network access disabled and a project being responsible for authoring the Packets.xml that uses external entities, it seems to me that the attack vector is fairly mitigated (and would require compromise of a build machine). However, I look to @bitWarrior for clear direction in security. |
We discussed this issue today. The expected deliver for the FPP format Telemetry Packet Specifications is in the next F´ release (when this would also be delivered). Thus the best solution using FPP and include files will be available. I will close this PR, but keep the issue (with a link to this PR) in case the schedule changes. |
See #3111
Tested locally. Would be ideal if someone can replicate the issue briefly and test this single line fix.
Instructions: