Bug 138110

Summary: python overflows stack buffer
Product: Red Hat Enterprise Linux 4 Reporter: Brian Stein <bstein>
Component: pythonAssignee: Brian Stein <bstein>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: bstevens, jturner
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-11-11 16:51:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Arjan van de Ven 2004-11-04 18:03:47 UTC
Description of problem:

Modules/socketmodule.c contains:

#ifdef ENABLE_IPV6
        char ip[MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN) + 1];
#else
        char ip[INET_ADDRSTRLEN + 1];
#endif
...
        /* Guarantee NUL-termination for PyString_FromString() below */
        memset((void *) &ip[0], '\0', sizeof(ip) + 1);

which overwrites the ip[] buffer by 1 byte.

Comment 1 Mihai Ibanescu 2004-11-04 18:31:04 UTC
Reported upstream as bug 105470

Comment 2 Mihai Ibanescu 2004-11-09 19:18:12 UTC
Fixed in python-2.3.4-13

Comment 3 Jay Turner 2004-11-11 16:51:53 UTC
Fix confirmed with 2.3.4-13.