** Also affects: qa-regression-testing
   Importance: Undecided
       Status: New

** Summary changed:

- autopkgtest failure with python 3.14
+ test-postfix.py  test_11_security_CVE_2008_2936 fails with python 3.14

** Description changed:

+ Python 3.14 changed[1] the behavior of os.unlink:
+ 
+ commit 5a57248b22ad3b9aafcaaadae2c304a1923daeca
+ Author: Serhiy Storchaka <[email protected]>
+ Date:   Sun May 4 17:24:10 2025 +0300
+ 
+     gh-81793: Always call linkat() from os.link(), if available (GH-132517)
+     
+     This fixes os.link() on platforms (like Linux and OpenIndiana) where the
+     system link() function does not follow symlinks.
+ 
+     * On Linux, it now follows symlinks by default and if
+       follow_symlinks=True is specified.
+     * On Windows, it now raises error if follow_symlinks=True is passed.
+     * On macOS, it now raises error if follow_symlinks=False is passed and
+       the system linkat() function is not available at runtime.
+     * On other platforms, it now raises error if follow_symlinks is passed
+       with a value that does not match the system link() function behavior
+       if if the behavior is not known.
+  
+     Co-authored-by: Joachim Henke <[email protected]>
+     Co-authored-by: Thomas Kluyver <[email protected]>
+ 
+ 
+ strace shows this when python calls os.link()
+ 
+ Python 3.13.12:
+   link("/var/tmp/secret.link", "/var/mail/taprqocr") = 0
+ 
+ Python 3.14.3:
+ linkat(AT_FDCWD, "/var/tmp/secret.link", AT_FDCWD, "/var/mail/toasljud", 
AT_SYMLINK_FOLLOW) = -1 EACCES (Permission denied)
+ 
+ 
+ This is causing the postfix test_11_security_CVE_2008_2936() test to fail:
+ ERROR: test_11_security_CVE_2008_2936 
(__main__.PostfixTest.test_11_security_CVE_2008_2936)
+ CVE-2008-2936 fixed
+ ----------------------------------------------------------------------
+ Traceback (most recent call last):
+   File 
"/tmp/autopkgtest.32bSwx/build.2MJ/real-tree/debian/tests/test-postfix.py", 
line 393, in test_11_security_CVE_2008_2936
+     os.link('/var/tmp/secret.link','/var/mail/%s' % (self.user.login))
+     ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ PermissionError: [Errno 13] Permission denied: '/var/tmp/secret.link' -> 
'/var/mail/taxollye'
+ 
+ 
+ On that system, /var/mail and /var/tmp are on the same filesystem, and not a 
symlink to /tmp for example (which is tmpfs).
+ 
+ 
+ 1.
+ 
https://github.com/python/cpython/commit/5a57248b22ad3b9aafcaaadae2c304a1923daeca
+ 
+ 
+ 
+ 
+ [Original description]
+ 
+ 
  Unsure what is going on[1]:
  
  105s Restarting postfix
  108s postfix/postlog: warning: not owned by root: 
/var/spool/postfix/etc/resolv.conf
  166s ........E......
  166s ======================================================================
  166s ERROR: test_11_security_CVE_2008_2936 
(__main__.PostfixTest.test_11_security_CVE_2008_2936)
  166s CVE-2008-2936 fixed
  166s ----------------------------------------------------------------------
  166s Traceback (most recent call last):
  166s   File 
"/tmp/autopkgtest.wenSdf/build.RVq/src/debian/tests/test-postfix.py", line 393, 
in test_11_security_CVE_2008_2936
  166s     os.link('/var/tmp/secret.link','/var/mail/%s' % (self.user.login))
  166s     ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  166s PermissionError: [Errno 13] Permission denied: '/var/tmp/secret.link' -> 
'/var/mail/tkftrwcx'
- 166s 
+ 166s
  166s ----------------------------------------------------------------------
  166s Ran 15 tests in 58.548s
- 166s 
+ 166s
  166s FAILED (errors=1)
  
- 
- 
- 1. 
https://autopkgtest.ubuntu.com/results/autopkgtest-resolute/resolute/amd64/p/postfix/20260126_185201_02d38@/log.gz
+ 1. https://autopkgtest.ubuntu.com/results/autopkgtest-
+ resolute/resolute/amd64/p/postfix/20260126_185201_02d38@/log.gz

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2139109

Title:
  test-postfix.py  test_11_security_CVE_2008_2936 fails with python 3.14

To manage notifications about this bug go to:
https://bugs.launchpad.net/qa-regression-testing/+bug/2139109/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to