]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.10] 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:16 +0000 (14:44 +0200)
committerGitHub <noreply@github.com>
Tue, 30 Jul 2024 12:44:16 +0000 (14:44 +0200)
commit0b65c8bf5367625673eafb92f85046a1b31259f2
tree14d74a3e1f1400d589dbf156c558f63ed845a8a4
parentd86ab5dde286642a378fcc32c243bc3b4bed750d
[3.10] gh-122133: Authenticate socket connection for `socket.socketpair()` fallback (GH-122134) (#122427)

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]