]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.9] gh-122133: Authenticate socket connection for `socket.socketpair()` fallback...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 30 Jul 2024 12:44:26 +0000 (14:44 +0200)
committerGitHub <noreply@github.com>
Tue, 30 Jul 2024 12:44:26 +0000 (14:44 +0200)
commit06fa244666ec6335a3b9bf2367e31b42b9a89b20
tree58e90a0b844b4aef60e35d8b4736fd8e0457127a
parent9e9c71d09e68b42fd1b251af6e4bfde697fe9b57
[3.9] gh-122133: Authenticate socket connection for `socket.socketpair()` fallback (GH-122134) (#122428)

Authenticate socket connection for `socket.socketpair()` fallback when the platform does not have a native `socketpair` C API.  We authenticate in-process using `getsocketname` and `getpeername` (thanks to Nathaniel J Smith for that suggestion).

(cherry picked from commit 78df1043dbdce5c989600616f9f87b4ee72944e5)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Lib/socket.py
Lib/test/test_socket.py
Misc/NEWS.d/next/Security/2024-07-22-13-11-28.gh-issue-122133.0mPeta.rst [new file with mode: 0644]