[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-28 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> fixed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset dae09c2b819c2683ad870733451c050b59c3eb93 by Miss Islington (bot) in branch '3.9': [3.9] bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866) (GH-32140) (GH-32156) https://github.com/python/cpython/commit/dae09c2b819c2683ad

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-28 Thread miss-islington
miss-islington added the comment: New changeset 5944807b09717d43bb017f700e8c451dd07199ed by Miss Islington (bot) in branch '3.10': [3.10] bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866) (GH-32140) https://github.com/python/cpython/commit/5944807b09717d43bb017f700e8c4

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +30236 pull_request: https://github.com/python/cpython/pull/32156 ___ Python tracker ___ __

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-27 Thread ty
Change by ty : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +30223 pull_request: https://github.com/python/cpython/pull/32141 ___ Python tracker ___ __

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-27 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +30222 pull_request: https://github.com/python/cpython/pull/32140 ___ Python tracker _

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset f6b3a07b7df60dc04d0260169ffef6e9796a2124 by ty in branch 'main': bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866) https://github.com/python/cpython/commit/f6b3a07b7df60dc04d0260169ffef6e9796a2124 -- __

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-24 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-24 Thread ty
ty added the comment: Actually the OS will always trust the length has already contained the last NUL. The test I did in this issue: https://github.com/rust-lang/rust/issues/69061 showed that: 1. OS trusted the input length was set correctly, both `sun_len` and the length of `struct sockadd

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: It looks like the length would be short by one in Python before this change, meaning binding or connecting to a non-anonymous named AF_UNIX socket potentially loses the last character of the path name intended to be bound? Depending on if the OS uses the l

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: Bug filing tip for ty/zonyitoo: Describe the problem in the text when filing the bug. Include its consequences and how it is observed in practice. A bug filed just saying "look at this code, this is wrong" does not communicate a need for anyone to spend ti

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not the socket programming expert. It just happened that I fixed some bugs here. But according to the manpage https://man7.org/linux/man-pages/man7/unix.7.html the address length should include the terminating NUL: offsetof(struct sockaddr_un, sun_pat

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-24 Thread Christian Heimes
Christian Heimes added the comment: We have a dedicated team of volunteers that triage incoming tickets. They assign tickets and ping experts. It looks like nobody triaged your submissions because nobody understood it. Your ticket did not contain an explanation and the link now goes to an un

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-24 Thread ty
ty added the comment: Oh, it should also occurs on Linux, I should correct that. -- nosy: -christian.heimes ___ Python tracker ___ ___

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-24 Thread ty
ty added the comment: More about the tests: The error will only shows on BSD systems, for example macOS. Here are some tests done with C and Rust: https://github.com/rust-lang/rust/issues/69061 If both the servers and clients are written in Python, you won't notice this bug because the ori

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-24 Thread ty
ty added the comment: Sorry Heimes. I just don't know who is responsible for this code, which is very very old. -- ___ Python tracker ___

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-24 Thread Christian Heimes
Christian Heimes added the comment: Antoine, Serhiy, please take a look. You are the last developers that touched the AF_UNIX socket path code. Ty, why are you pinging me on this issue or on the PR? I'm neither familiar with that code nor responsible for it. -- components: +Extensio

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-24 Thread ty
ty added the comment: Ping Heimes. This is a huge bug that exists for a very long time, please consider merge it and fix it in the next relesae. -- nosy: +christian.heimes ___ Python tracker __

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-24 Thread ty
ty added the comment: I think I have already provided enough information about this bug. The `len_ret` was the length of `sockaddr_un`, which should include the terminated NUL in the `sun_path`. But the original implementation only use `path.len + offsetof(struct sockaddr_un, sun_path)`. R

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-23 Thread Aaron Gallagher
Aaron Gallagher <_...@habnab.it> added the comment: sigh.. adding myself to nosy here too in the hope that this gets any traction -- nosy: +habnabit ___ Python tracker ___

[issue44493] Missing terminated NUL in the length of sockaddr_un

2021-09-26 Thread Ned Deily
Change by Ned Deily : -- resolution: fixed -> versions: +Python 3.11 -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue44493] Missing terminated NUL in the length of sockaddr_un

2021-08-22 Thread ty
ty added the comment: Hello and PING. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue44493] Missing terminated NUL in the length of sockaddr_un

2021-07-25 Thread ty
ty added the comment: Changes have been made in this PR, waiting for reviewing. -- resolution: -> fixed ___ Python tracker ___ ___

[issue44493] Missing terminated NUL in the length of sockaddr_un

2021-06-22 Thread ty
Change by ty : -- keywords: +patch pull_requests: +25441 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26866 ___ Python tracker ___ _

[issue44493] Missing terminated NUL in the length of sockaddr_un

2021-06-22 Thread ty
New submission from ty : https://github.com/python/cpython/blob/main/Modules/socketmodule.c#L1700 -- components: Library (Lib) messages: 396379 nosy: zonyitoo priority: normal severity: normal status: open title: Missing terminated NUL in the length of sockaddr_un type: behavior version