<p>The attached file will cause an oud of bounds heap read in "rpmkeys -K".</p>
<p><a href="https://github.com/rpm-software-management/rpm/files/755884/rpmkeys-pgpPrtSubType-rpmpgp-444.zip">rpmkeys-pgpPrtSubType-rpmpgp-444.zip</a></p>
<p>Here's the address sanitizer output:</p>
<pre><code>==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
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/rpm-software-management/rpm/issues/148">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ANb808B55F5zl9qrmiZD1ufyWJDxasRfks5rZ5BJgaJpZM4L4vV7">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ANb80359g2PM4A6R0hvJGT5qH2FWvIw_ks5rZ5BJgaJpZM4L4vV7.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/rpm-software-management/rpm/issues/148"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/rpm-software-management/rpm","title":"rpm-software-management/rpm","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/rpm-software-management/rpm"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"rpmkeys out of bounds heap read in pgpPrtSubType, rpmpgp.c line 444 (#148)"}],"action":{"name":"View Issue","url":"https://github.com/rpm-software-management/rpm/issues/148"}}}</script>