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
[>=2.4.5] Fix to CVE-2022-25236 breaks biboumi, ClairMeta, jxmlease, libwbxml, openleadr-python, rnv, xmltodict #572
Comments
|
Hi @jamiegau , I'm a bit scared by you shouting in all caps here but I'd be willing to see if I can help and understand the problem better. We can jump on a voice call soon-ish if you reach out to me via my profile e-mail, if you like. If that doesn't fit for some reason, I'd ask to provide move details here of what the regression symptom is. Thank you! |
|
I think what @jamiegau refers to is a problem with the latest libexpat1 update in Ubuntu from
It can be reproduced with a recent Ubuntu 18.04 docker image: [0] https://bugs.launchpad.net/ubuntu/+source/python-xmltodict/+bug/1961800 |
|
I use a tool called clairmeta. It reads XML files that make up cinema DCPs to test them for accuracy. I also noticed it was broken in the same way under ubuntu 20.04. I had a system it was not broken, and to reproduce the issue, only after doing a apt full-upgrade did the problem occur. This made me look at packages that were replaced and I tracked it down to expat. There is a recent security update that replaced the expat release that came with 20.04. I had to regress to the previous version and the problem went away. I then started working on my docker containers to implement the same regression... I suppose I am shouting because it is amazing that such a silly behaviour by Alpine in that they didn't update the release number and add it to the repo as so if such a problem occurred, those using alpine could regress.. But it's impossible. I cannot even find the original version of expat to cook into my dockerfile. I would have to compile it myself, which could result in unknown amount of work, or move to a ubuntu based container that I can regress on. In any case, as the clairmeta is a python based library, and utilises lxml, it likely relies on expat as well. But really, I am very annoyed as I am unable to do any updates or fix the problem until I can somehow get Alpine to regress or a fixed version of the expat appears in their repo. This is more of an issue with Alpine in terms of my issue, not expat (apart from expat needing to be fixed) But that's why we have version number and the ability to pin versions. |
|
Hi @sebageek and @jamiegau , thanks for your replies. This also hit Debian today at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006317 . Some relation to PR #561 is likely but maybe more. I'll have a closer look today. |
|
Hi @sebageek and @jamiegau, I was able to get to the root of the problem now. You will probably not like what's coming, please take a seat. I'll do a brain dump as bullet points: For the Expat half ot things:
For the Alpine half of things:
Best, Sebastian |
|
Thanks @hartwork .. I have two options, wait for it to flow into Alpine. You mentioned quick but how quick exactly? A few days. A few weeks? I could wait a while. I must admit, I am very surprised Alpine does not support regression to older versions. This could break a LOT of containers and those using it will be stuck like I am. |
|
@jamiegau for a short reply, I think Ymagis/ClairMeta#213 has potential to be among the more quick and more cost-effective options for your environment. For anyone interested, here's a summary of known affected upstreams and links to their status: biboumi
ClairMeta
jxmlease
libwbxml
openleadr-pythonrnv
xmltodict |
|
Thanks for all the help @hartwork and @remia Good luck to other projects facing this challenge. |
|
Hey @hartwork, Passing a different |
|
@sebageek glad to hear, thanks for the update! 👍 |
Newer version of libexpat have a mitigation for CVE-2022-25236 in place, which disallows the use of certain characters as namespace separators (to my understanding this is the separator used to separate namespace and tag name in the parsed xml output we receive from the library). We implicitly use libexpat via xmltodict.parse(), xmltodict uses a default of ':', which now is invalid. Using ':' as separator results in the following exception: xml.parsers.expat.ExpatError: out of memory: line 1, column 0 This can also be reproduced with this python snippet: xmltodict.parse("<foo></foo>", process_namespaces=True) To mitigate this we need to use a different separator. xmltodict.parse() exposes this as an argument, so passing namespace_separator=' ' (as recommended by libexpat as a char that is not part of an url, see bug reports below or CVE) solves the problem for us. From what I can see this also doesn't require any other changes on our side. Relevant change in libexpat: * libexpat/libexpat#561 Relevant bugreports: * libexpat/libexpat#572 * martinblech/xmltodict#289
Newer version of libexpat have a mitigation for CVE-2022-25236 in place, which disallows the use of certain characters as namespace separators (to my understanding this is the separator used to separate namespace and tag name in the parsed xml output we receive from the library). We implicitly use libexpat via xmltodict.parse(), xmltodict uses a default of ':', which now is invalid. Using ':' as separator results in the following exception: xml.parsers.expat.ExpatError: out of memory: line 1, column 0 This can also be reproduced with this python snippet: xmltodict.parse("<foo></foo>", process_namespaces=True) To mitigate this we need to use a different separator. xmltodict.parse() exposes this as an argument, so passing namespace_separator=' ' (as recommended by libexpat as a char that is not part of an url, see bug reports below or CVE) solves the problem for us. From what I can see this also doesn't require any other changes on our side. Relevant change in libexpat: * libexpat/libexpat#561 Relevant bugreports: * libexpat/libexpat#572 * martinblech/xmltodict#289
lib: Relax fix to CVE-2022-25236 with regard to RFC 3986 URI characters (fixes #572)
It appears the recent security update for expat has broken many systems.
Under ubuntu 20.04 I was able to regress by doing
apt-get install libexpat1=2.2.9-1build1 libexpat1-dev=2.2.9-1build1Under Alpine linux and all my docker installs.. I AM NOT ABLE TO REGRESS AS THE REPO REPLACED THE RELEASE APK WITH AN UPDATED BUT BROKEN VERSION. They did not add a newer apk with a different version number..
I cannot find an older version to cook into the dockerfile. HELP!
The text was updated successfully, but these errors were encountered: