[3.14] gh-149018: Use XML_SetHashSalt16Bytes in pyexpat/_elementtree when possible (GH-149023)#149646
Conversation
…lementtree` when possible (pythonGH-149023) (cherry picked from commit 24b8f12) Co-authored-by: Stan Ulbrych <stan@python.org>
|
@picnixz I think I had it confused with this one, I think this one needs a review since I fixed conflicts ( |
Sorry, something went wrong.
|
Wait, SetBillionLaughsAttackProtectionMaximumAmplification isn't backported? Oh I think I totally forgot about it! |
Sorry, something went wrong.
We're all forgetting backports it seems ;-) |
Sorry, something went wrong.
|
Hi! Is there any ETA for a backport to 3.10? |
Sorry, something went wrong.
|
#150496 has been backported, this now has a conflict and is awaiting review. |
Sorry, something went wrong.
eeea765
into
python:3.14
Jun 9, 2026
|
Thanks @StanFromIreland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11, 3.12, 3.13. |
Sorry, something went wrong.
|
Sorry, @StanFromIreland, I could not cleanly backport this to |
Sorry, something went wrong.
|
Sorry, @StanFromIreland, I could not cleanly backport this to |
Sorry, something went wrong.
|
Sorry, @StanFromIreland, I could not cleanly backport this to |
Sorry, something went wrong.
|
Sorry, @StanFromIreland, I could not cleanly backport this to |
Sorry, something went wrong.
|
I'm seeing a crash in FreeCAD since I updated to 3.14.6 when I open the CAM workbench (and possibly in other places) and it seems to be related. This did not happen in 3.14.5: Here's gdb when it crashes: |
Sorry, something went wrong.
|
@picnixz I'm not sure why the call to |
Sorry, something went wrong.
|
@picnixz @al20ov PS: when I fed these logs to AI for help it was hinting at the parser pointer being corrupted which could mean that libexpat is the explosion site but the cause is prior and outside. Maybe there is a chance to run this instrumented with e.g. AddressSanitizer to get closer to a cause of prior memory corruption. Just thinking aloud here. |
Sorry, something went wrong.
|
Sorry, I didn't know if this was the best place to report this but I couldn't find any similar issues and the combination of a recent CPython update then XML_SetHashSalt16Bytes and expat in the crash logs led me here. I'll try to run this with instrumentation tomorrow and report back if I find anything of value. |
Sorry, something went wrong.
|
I installed It's hard to read but the struct doesn't look so great. Some of these addresses look they were overwritten with strings? I'll try to run it with ASan next which means rebuilding FreeCAD with |
Sorry, something went wrong.
@al20ov thanks! Yes, but it needs to be passed to both the compiler and the linker. |
Sorry, something went wrong.
|
I can't reproduce the issue when compiled and linked with ASan...... (CFLAGS/CXXFLAGS+=" -fsanitize=address -fno-omit-frame-pointer" LDFLAGS+="-fsanitize=address" and libsanitizer-devel). |
Sorry, something went wrong.
(cherry picked from commit 24b8f12)
pyexpatwith protection against hash flooding #149018