Skip to content

[3.6] bpo-35050: AF_ALG length check off-by-one error (GH-10058)#11070

Merged
vstinner merged 1 commit into
python:3.6from
vstinner:af_alg36
Dec 10, 2018
Merged

[3.6] bpo-35050: AF_ALG length check off-by-one error (GH-10058)#11070
vstinner merged 1 commit into
python:3.6from
vstinner:af_alg36

Conversation

@vstinner

@vstinner vstinner commented Dec 10, 2018

Copy link
Copy Markdown
Member

The length check for AF_ALG salg_name and salg_type had a off-by-one
error. The code assumed that both values are not necessarily NULL
terminated. However the Kernel code for alg_bind() ensures that the last
byte of both strings are NULL terminated.

Signed-off-by: Christian Heimes christian@python.org
(cherry picked from commit 2eb6ad8)

https://bugs.python.org/issue35050

The length check for AF_ALG salg_name and salg_type had a off-by-one
error. The code assumed that both values are not necessarily NULL
terminated. However the Kernel code for alg_bind() ensures that the last
byte of both strings are NULL terminated.

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 2eb6ad8)
@bedevere-bot bedevere-bot added type-bug An unexpected behavior, bug, or error awaiting merge labels Dec 10, 2018
@vstinner vstinner merged commit bad41ce into python:3.6 Dec 10, 2018
@vstinner vstinner deleted the af_alg36 branch December 10, 2018 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants