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

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