socket: Buffer overrun while reading unterminated AF_UNIX addresses

Ouverte
#52,619 20 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
15/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
c, python
Domaine
networking, security

Piste de recherche

The issue concerns CPython's socket extension, but no current source file is named; start by reviewing issue8372.patch and the listed Linux test programs bindconn.c and accept.c. Reproduce the unterminated AF_UNIX case on Linux, then run the relevant socket tests and confirm bounded address handling without a buffer overrun.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

3.7 (EOL) extension-modules topic-socket type-security
BPO 8372
Nosy @loewis, @terryjreedy, @pitrou, @vstinner
Files
  • linux-pass-unterminated.diff: Allow non-null-terminated AF_UNIX addresses on Linux
  • return-unterminated-2.x.diff: Stop at end of address as given by addrlen (2.x)
  • return-unterminated-3.x.diff: Stop at end of address as given by addrlen (3.x)
  • addrlen-2.x.diff: Don't use addrlen larger than original buffer (2.x)
  • addrlen-3.x.diff: Don't use addrlen larger than original buffer (3.x)
  • test-2.x.diff: Tests for Linux (2.x)
  • test-3.x.diff: Tests for Linux (3.x)
  • bindconn.c: Test program to bind to an address and connect to a server
  • accept.c: Test program to accept connections and print the contents of sun_path
  • issue8372.patch
  • linux-pass-unterminated-4spc.diff
  • return-unterminated-2.x-4spc.diff
  • return-unterminated-3.x-4spc.diff
  • addrlen-2.x-4spc.diff
  • addrlen-3.x-4spc.diff
  • test-2.x-new.diff
  • test-3.x-new.diff
  • addrlen-makesockaddr-2.x.diff
  • addrlen-makesockaddr-3.x.diff
  • return-unterminated-2.x-new.diff
  • return-unterminated-3.x-maint-new.diff
  • return-unterminated-3.x-trunk-new.diff
  • enable-unterminated-2.7-2015-05-05.diff
  • fix-overrun-2.7-2015-05-05.diff
  • enable-unterminated-3.2-2015-05-05.diff
  • fix-overrun-3.2-2015-05-05.diff
  • enable-unterminated-3.3-2015-05-05.diff
  • fix-overrun-3.3-2015-05-05.diff
  • enable-unterminated-3.4-2015-05-05.diff
  • fix-overrun-3.4-2015-05-05.diff
  • enable-unterminated-3.5-2015-05-06.diff
  • fix-overrun-3.5-2015-05-06.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2010-04-11.18:33:03.587>
    labels = ['type-security', 'extension-modules', '3.7']
    title = 'socket: Buffer overrun while reading unterminated AF_UNIX\taddresses'
    updated_at = <Date 2016-09-09.00:28:34.411>
    user = 'https://bugs.python.org/baikie'
    

    bugs.python.org fields:

    activity = <Date 2016-09-09.00:28:34.411>
    actor = 'BreamoreBoy'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Extension Modules']
    creation = <Date 2010-04-11.18:33:03.587>
    creator = 'baikie'
    dependencies = []
    files = ['16874', '16875', '16876', '16877', '16878', '16879', '16880', '16898', '16899', '18753', '18770', '18771', '18772', '18773', '18774', '18775', '18776', '22384', '22385', '22386', '22387', '22388', '39297', '39298', '39299', '39300', '39301', '39302', '39303', '39304', '39309', '39310']
    hgrepos = []
    issue_num = 8372
    keywords = ['patch']
    message_count = 20.0
    messages = ['102861', '102964', '115595', '115606', '115615', '115669', '115673', '115716', '116112', '116178', '116226', '116234', '116236', '138213', '138214', '138224', '138472', '242577', '242621', '242695']
    nosy_count = 7.0
    nosy_names = ['loewis', 'terry.reedy', 'pitrou', 'vstinner', 'baikie', 'neologix', 'rosslagerwall']
    pr_nums = []
    priority = 'high'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'security'
    url = 'https://bugs.python.org/issue8372'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5', 'Python 3.6', 'Python 3.7']
    

    Langage dominant
    Python
    Étoiles
    77.2k
    Forks
    36k
    Merge moyen
    1 j 9 h
    PR mergées (30 j)
    558

    Guide de contribution

    Ouvrir le guide de contribution

    Par où commencer

    1. Lisez l'issue en entier, puis le guide de contribution du projet.
    2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
    3. Forkez le dépôt et travaillez sur une branche.
    4. Ouvrez une pull request qui référence le numéro de l'issue.

    Autres issues de python/cpython

    Toutes les issues de python/cpython

    Issues similaires

    Plus d'issues Python

    Recevez les nouvelles issues par e-mail

    Un résumé court des issues GitHub adaptées aux débutants.