Skip to content

[3.4] bpo-34623: Use XML_SetHashSalt in _elementtree#9953

Merged
larryhastings merged 2 commits into
python:3.4from
stratakis:3.4
Feb 25, 2019
Merged

[3.4] bpo-34623: Use XML_SetHashSalt in _elementtree#9953
larryhastings merged 2 commits into
python:3.4from
stratakis:3.4

Conversation

@stratakis

@stratakis stratakis commented Oct 18, 2018

Copy link
Copy Markdown
Contributor

Backport for the 3.4 branch.

https://bugs.python.org/issue34623

miss-islington and others added 2 commits October 18, 2018 16:54
The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.

Signed-off-by: Christian Heimes <christian@python.org>

https://bugs.python.org/issue34623
(cherry picked from commit cb5778f)

Co-authored-by: Christian Heimes <christian@python.org>
Comment thread Modules/_elementtree.c
}
/* expat < 2.1.0 has no XML_SetHashSalt() */
if (EXPAT(SetHashSalt) != NULL) {
EXPAT(SetHashSalt)(self_xp->parser,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only line that has been modified from the previous PR's. Namely it's self_xp->parser on 3.4. On the other branches it's self->parser due to argumentclinication.

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@tiran: Would you mind to review it as well?

@vstinner

Copy link
Copy Markdown
Member

Oh, Travis CI failed on a random failure:

======================================================================
ERROR: test_ignore (test.test_multiprocessing_forkserver.TestIgnoreEINTR)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/test/_test_multiprocessing.py", line 3623, in test_ignore
    os.kill(p.pid, signal.SIGUSR1)
ProcessLookupError: [Errno 3] No such process

I scheduled a new job.

@vstinner vstinner closed this Jan 21, 2019
@vstinner vstinner reopened this Jan 21, 2019
@vstinner

Copy link
Copy Markdown
Member

I closed/reopened the PR to trigger a new Travis CI job.

@vstinner

Copy link
Copy Markdown
Member

@larryhastings: Hi Larry, would you mind to merge this security fix?

@larryhastings larryhastings merged commit d16eaf3 into python:3.4 Feb 25, 2019
@bedevere-bot

Copy link
Copy Markdown

@larryhastings: Please replace # with GH- in the commit message next time. Thanks!

@larryhastings

Copy link
Copy Markdown
Contributor

Thank for the backported fix!

@stratakis stratakis deleted the 3.4 branch June 18, 2020 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-security A security issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants