Bug 1293139 - Invalid memory access in getmntent_r()
Summary: Invalid memory access in getmntent_r()
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 23
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Florian Weimer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-20 15:45 UTC by Jon Burgess
Modified: 2016-05-11 11:40 UTC (History)
8 users (show)

Fixed In Version: glibc-2.22-15.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-10 18:51:59 UTC


Attachments (Terms of Use)
Test code from upstream bug report (110 bytes, text/x-csrc)
2015-12-20 15:45 UTC, Jon Burgess
no flags Details


Links
System ID Priority Status Summary Last Updated
Sourceware 18887 None None None 2015-12-20 15:45:03 UTC

Description Jon Burgess 2015-12-20 15:45:03 UTC
Created attachment 1108003 [details]
Test code from upstream bug report

Description of problem: Running valgrind on any program using getmntent() shows an invalid memory access in getmntent_r(). The bug has been fixed in the upstream glibc.


Version-Release number of selected component (if applicable):
glibc-2.22-6.fc23.x86_64

How reproducible:
Every time

Steps to Reproduce:
1. gcc test.c
2. valgrind ./a.out

Actual results:

==21800== Invalid read of size 1
==21800==    at 0x4F2EE74: getmntent_r (mntent_r.c:139)
==21800==    by 0x4005FC: main (in /home/jburgess/a.out)
==21800==  Address 0x51f62af is 1 bytes before a block of size 4,096 alloc'd
==21800==    at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==21800==    by 0x4F2EC99: allocate (mntent.c:35)
==21800==    by 0x4F2EC99: getmntent (mntent.c:44)
==21800==    by 0x4005FC: main (in /home/jburgess/a.out)


Expected results:


Additional info:

Upstream glibc report: https://sourceware.org/bugzilla/show_bug.cgi?id=18887

Comment 1 Fedora Update System 2016-05-07 17:20:43 UTC
glibc-2.22-15.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-68abc0be35

Comment 2 Fedora Update System 2016-05-08 16:26:04 UTC
glibc-2.22-15.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-68abc0be35

Comment 3 Florian Weimer 2016-05-09 09:44:06 UTC
Already fixed upstream prior to the 2.23 release:

commit b0e805fa0d6fea33745952df7b7f5442ca4c374f
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Fri Aug 28 17:08:49 2015 -0400

    getmntent: fix memory corruption w/blank lines [BZ #18887]

Comment 4 Fedora Update System 2016-05-10 17:58:12 UTC
glibc-2.22-15.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.