This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Long string arguments cause nis.map() segfault
Type: crash Stage: resolved
Components: Library (Lib) Versions: Python 3.10
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: vstinner, xxm
Priority: normal Keywords:

Created on 2021-03-22 07:12 by xxm, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg389280 - (view) Author: Xinmeng Xia (xxm) Date: 2021-03-22 07:12
nis.maps() with long string argument will lead to segfault of interpreter.  See the following example:

=====================================================
Python 3.10.0a6 (default, Mar 19 2021, 11:45:56) [GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import nis;
>>> nis.maps('abs/'*10000000)
Segmentation fault (core dumped)
=====================================================

System: ubuntu 16.04
msg389281 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-03-22 08:01
I can reproduce the crash. It's a not a bug in Python but in yp_master(). On my Fedora 33, this function comes from libnsl2 (/lib64/libnsl.so.2):

* https://bugz.fedoraproject.org/libnsl2
* https://github.com/thkukuk/libnsl

"""
This package contains the libnsl library. This library contains
the public client interface for NIS(YP) and NIS+.
This code was formerly part of glibc, but is now standalone to
be able to link against TI-RPC for IPv6 support.
"""

Please report the bug to https://bugz.fedoraproject.org/libnsl2 (or to you nis implementation).
History
Date User Action Args
2022-04-11 14:59:43adminsetgithub: 87753
2021-03-22 08:01:03vstinnersetstatus: open -> closed

nosy: + vstinner
messages: + msg389281

resolution: third party
stage: resolved
2021-03-22 07:12:49xxmcreate