]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-122133: Authenticate socket connection for `socket.socketpair()` fallback...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 29 Jul 2024 22:02:20 +0000 (00:02 +0200)
committerGitHub <noreply@github.com>
Mon, 29 Jul 2024 22:02:20 +0000 (22:02 +0000)
commit220e31adeaaa8436c9ff234cba1398bc49e2bb6c
treeaeca128e727a4cf94f039bbb43203f9603698391
parentbad84975ffdad07a3a4fe923280e65c1609bf1f2
[3.12] gh-122133: Authenticate socket connection for `socket.socketpair()` fallback (GH-122134) (GH-122425)

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]