[Rpm-maint] [rpm-software-management/rpm] rpmkeys out of bounds heap read in pgpPrtSubType, rpmpgp.c line 444 (#148)

Hanno Böck notifications at github.com
Mon Feb 6 21:27:37 UTC 2017

The attached file will cause an oud of bounds heap read in "rpmkeys -K".


Here's the address sanitizer output:
==15315==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000001a81 at pc 0x000000677361 bp 0x7fff631cdeb0 sp 0x7fff631cdea8
READ of size 8 at 0x602000001a81 thread T0
    #0 0x677360 in pgpPrtSubType /f/rpm/rpm/rpmio/rpmpgp.c:444:3
    #1 0x669d1d in pgpPrtSig /f/rpm/rpm/rpmio/rpmpgp.c:594:6
    #2 0x669d1d in pgpPrtPkt /f/rpm/rpm/rpmio/rpmpgp.c:819
    #3 0x669d1d in pgpPrtParams /f/rpm/rpm/rpmio/rpmpgp.c:978
    #4 0x595487 in rpmSigInfoParse /f/rpm/rpm/lib/signature.c:104:6
    #5 0x52d908 in rpmpkgVerifySigs /f/rpm/rpm/lib/rpmchecksig.c:263:7
    #6 0x52f3ea in rpmcliVerifySignatures /f/rpm/rpm/lib/rpmchecksig.c:381:13
    #7 0x50420d in main /f/rpm/rpm/rpmkeys.c:74:7
    #8 0x7ff690a0078f in __libc_start_main (/lib64/libc.so.6+0x2078f)
    #9 0x41c558 in _start (/r/rpm/rpmkeys+0x41c558)

0x602000001a81 is located 1 bytes to the right of 16-byte region [0x602000001a70,0x602000001a80)
allocated by thread T0 here:
    #0 0x4cc6b8 in malloc (/r/rpm/rpmkeys+0x4cc6b8)
    #1 0x664624 in rmalloc /f/rpm/rpm/rpmio/rpmmalloc.c:44:13

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20170206/d390726d/attachment.html>

More information about the Rpm-maint mailing list