]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35050: AF_ALG length check off-by-one error (GH-10058) (GH-11069)
authorVictor Stinner <vstinner@redhat.com>
Mon, 10 Dec 2018 11:13:01 +0000 (12:13 +0100)
committerGitHub <noreply@github.com>
Mon, 10 Dec 2018 11:13:01 +0000 (12:13 +0100)
commit1a7b62d5571b3742e706d247dfe6509f68f1409d
treedccc6927ab20b00f789c07eba42185c74535e227
parentc3cc75134d41c6d436c21d3d315dc069b4826432
bpo-35050: AF_ALG length check off-by-one error (GH-10058) (GH-11069)

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 2eb6ad8578fa9d764c21a92acd8e054e3202ad19)
Lib/test/test_socket.py
Misc/NEWS.d/next/Core and Builtins/2018-10-23-15-03-53.bpo-35050.49wraS.rst [new file with mode: 0644]
Modules/socketmodule.c