-
Notifications
You must be signed in to change notification settings - Fork 322
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
double-free on yaml_event_delete api #297
Comments
No one pays attention,make all public 👾 |
I'm not a C expert, but calling |
As you mentioned, Regarding the fix, my understanding is that the queue should store object pointers, the pointers can simply be set to NULL after free. There are many places where references are implemented, with my limited understanding of the project, sorry unable to provide a complete fix or patch currently~ In addition, this project is a widely-used public library. I search the history vuln on snyk, the affected public components and systems exceed 200+. No one pay attention in the last two weeks, I thought the project was deprected and no longer maintained~ |
I did not say that. I said Let me just quote the documentation for the emitter on https://pyyaml.org/wiki/LibYAML
It doesn't even mention I can also not prevent people from calling If there is really code out there that looks like yours, it would double free all the time whenever there are anchors or tags involved, so people's error logs should be full and they would hopefully look into their logs. It might be possible to be more defensive by using pointers, you said, but that sounds like a big change that any binding would have to adjust to as well. I personally don't have any time for that in the foreseeable future.
Oh come on. The last commit is three weeks old, and additionally it is an old library that isn't expected to get much changes anyway. |
Was this #298 CVE-2024-35329 created by you? |
In general, the code of those developers should get a CVE filed then. In this case I think there is indeed room for improvement, though. The code mentioned in the issue description is something that supposedly should be supported. The symmetrical invocations of
That sounds reasonable (although I am not familiar with the codebase so I can't say for sure). So you may go ahead and create a PR implementing/demonstrating your idea.
That doesn't mean the library has many contributors, though.
Pressuring developers of open source projects this way was one of the pieces that allowed the recent xz incident to happen…
Unfortunately, there will normally be no logs on a double-free. The output from the issue description only has those logged because an address sanitizer was used but that's normally not the case. |
Thank you very much for your detailed explanation and sorry again for the trouble this has caused you~ maybe there is a difference in our understanding of vulnerability.
the latest version is v0.2.5 at 2020y,It is also the version introduced by many open source libraries and systems,Can you ensure that everyone who use this project will pull the latest code for compilation? about unfriendly, As I said, no one paid attention to this issue in the past two weeks, so I made cve public and uploaded part of the pocs,If you think this method is unfriendly, I will delete all information and you can reject all cve,As of receipt of your reply, I have terminated all remaining reports. |
Thank you for your kind reminder. This is indeed something I hadn't considered. I used to be a security researcher, and although I haven't been hunting for vulnerabilities for many years, I would like to share the background of this issue. Initially, during my development process with Rust, I needed to parse YAML files, so I introduced the In line with my habit of being cautious about the use of I evaluated the impact of this library and found that it is indeed widely used, and no new version has been released recently. Ultimately, I decided to abandon using this library and switched to the From the perspective of a security practitioner, or from different developers' perspectives, the tolerance for code risks varies, as does the understanding of vulnerabilities. If there is no consensus on the definition of a vulnerability (risks), then further discussion may not be very meaningful. |
You created this issue here about CVE-2024-35325 |
Maybe I didn't express it clearly, all public. The 4 public POCs could find in this repo(you can reject them). also I have terminated all remaining reports. |
But you only reported this issue for one of the four. and then published another one of the four. This issue is about CVE-2024-35325 Instead you took CVE-2024-35329 (that is a 9 at the end) and published that one: |
And as I said before, this issue was already public when you created it. IT's not a private issue. |
I have explained it very clearly. I made all public. I can't decide the order in which nist should be made public. In addition, if the discussion is not about the vulnerability or you don't think this is a vulnerability, you just reject it and close this issue. I should sleep now,Sorry for taking up so much of your time~ |
No you didn't explain very clearly. You only reported one of the 4 issues to us. |
Description
alloc
anchor
by apiyaml_sequence_start_event_initialize
, then add event by apiyaml_emitter_emit
,we could free
anchor
again byyaml_event_delete
after callyaml_emitter_delete
the detail process in below:
ASAN Report
Poc
the reserved CVE ID
CVE-2024-35325
will be made public after the vulnerability is fixed.The text was updated successfully, but these errors were encountered: