Skip to content

Commit 66656d8

Browse files
committed
Update docs for CVE-2024-4030 reference
1 parent 7768ff1 commit 66656d8

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

Doc/whatsnew/3.13.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,12 @@ os
847847
:c:func:`!posix_spawn_file_actions_addclosefrom_np`.
848848
(Contributed by Jakub Kulik in :gh:`113117`.)
849849

850+
* :func:`os.mkdir` and :func:`os.makedirs` on Windows now support passing a
851+
*mode* value of ``0o700`` to apply access control to the new directory. This
852+
implicitly affects :func:`tempfile.mkdtemp` and is a mitigation for
853+
:cve:`2024-4030`. Other values for *mode* continue to be ignored.
854+
(Contributed by Steve Dower in :gh:`118486`.)
855+
850856
os.path
851857
-------
852858

@@ -989,6 +995,14 @@ sys
989995
This function is not guaranteed to exist in all implementations of Python.
990996
(Contributed by Serhiy Storchaka in :gh:`78573`.)
991997

998+
tempfile
999+
--------
1000+
1001+
* On Windows, the default mode ``0o700`` used by :func:`tempfile.mkdtemp` now
1002+
limits access to the new directory due to changes to :func:`os.mkdir`. This
1003+
is a mitigation for :cve:`2024-4030`.
1004+
(Contributed by Steve Dower in :gh:`118486`.)
1005+
9921006
time
9931007
----
9941008

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
:func:`os.mkdir` on Windows now accepts *mode* of ``0o700`` to restrict
2+
the new directory to the current user. This fixes :cve:`2024-4030`
3+
affecting :func:`tempfile.mkdtemp` in scenarios where the base temporary
4+
directory is more permissive than the default.

0 commit comments

Comments
 (0)