Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-02-17 Thread Panu Matilainen
This has been split into multiple different PR's as requested, no point keeping this open anymore. Thanks for the reproducer and all. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-02-17 Thread Panu Matilainen
Closed #1471. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1471#event-4340721727___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-01-15 Thread Demi Marie Obenour
> All I've been asking is for you to make available the reproducers that you do > have. Ah okay. I thought you were asking me to make reproducers for all of them, which would take time I don’t really have right now. Here is an RPM (gzipped so GitHub will accept it) that reproduces the

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-01-15 Thread Panu Matilainen
All I've been asking is for you to make available the reproducers that you do have. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-01-15 Thread Demi Marie Obenour
I did manage to add two fuzz targets, one of which is in one these PRs. The other was submitted privately to Red Hat Security Response as it found some significant security problems -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-01-15 Thread Demi Marie Obenour
> I still haven't seen a single reproducer. Please make them available for the > cases you have them - like said I need to prioritize. I initially thought the > newly created individual PR's were those, but clearly that's not the case. I can create a reproducer for the integer overflow which

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-01-15 Thread Panu Matilainen
I still haven't seen a single reproducer. Please make them available for the cases you have them - like said I need to prioritize. I initially thought the newly created individual PR's were those, but clearly that's not the case. -- You are receiving this because you are subscribed to this

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-01-13 Thread Demi Marie Obenour
> Please split off the commits with actual reproducer to a separate PR, and > make the reproducers available someplace. That allows us to prioritize, > properly reviewing this kind of stuff is a lot of work. Will do. I only have reproducers for a small subset of these, though. > Second, split

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-01-13 Thread Panu Matilainen
@pmatilai requested changes on this pull request. Please split off the commits with actual reproducer to a separate PR, and make the reproducers available someplace. Second, split this further into smaller PRs, this kind of pile-up is impossible to meaningfully review in GH. Stick to just a

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-01-11 Thread Demi Marie Obenour
The LGTM alert is a false positive: the dead code is a static assertion, so it is a no-op at runtime anyway. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-01-11 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -169,8 +169,8 @@ rpmRC rpmpkgRead(struct rpmvs_s *vs, FD_t fd, goto exit; } -/* Read the signature header. Might not be in a contiguous region. */ -if (hdrblobRead(fd, 1, 0, RPMTAG_HEADERSIGNATURES, sigblob, )) +/* Read

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-01-11 Thread Demi Marie Obenour
@DemiMarie commented on this pull request. > @@ -169,8 +169,8 @@ rpmRC rpmpkgRead(struct rpmvs_s *vs, FD_t fd, goto exit; } -/* Read the signature header. Might not be in a contiguous region. */ -if (hdrblobRead(fd, 1, 0, RPMTAG_HEADERSIGNATURES, sigblob, )) +/* Read

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-01-11 Thread lgtm-com[bot]
This pull request **introduces 1 alert** when merging 71842ad20cccadd907f7a345d2101c203a97490c into 5ce2b5e3121aa07eb1ccf2bc24443c1536bf94d5 - [view on LGTM.com](https://lgtm.com/projects/g/rpm-software-management/rpm/rev/pr-09a8b39359d616c6e625afffb647f96d79c4f7a5) **new alerts:** * 1 for

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-01-10 Thread Demi Marie Obenour
@DemiMarie commented on this pull request. > @@ -169,8 +169,8 @@ rpmRC rpmpkgRead(struct rpmvs_s *vs, FD_t fd, goto exit; } -/* Read the signature header. Might not be in a contiguous region. */ -if (hdrblobRead(fd, 1, 0, RPMTAG_HEADERSIGNATURES, sigblob, )) +/* Read

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-01-10 Thread Demi Marie Obenour
@DemiMarie commented on this pull request. > @@ -169,8 +169,8 @@ rpmRC rpmpkgRead(struct rpmvs_s *vs, FD_t fd, goto exit; } -/* Read the signature header. Might not be in a contiguous region. */ -if (hdrblobRead(fd, 1, 0, RPMTAG_HEADERSIGNATURES, sigblob, )) +/* Read

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-01-10 Thread Demi Marie Obenour
@DemiMarie commented on this pull request. > @@ -169,8 +169,8 @@ rpmRC rpmpkgRead(struct rpmvs_s *vs, FD_t fd, goto exit; } -/* Read the signature header. Might not be in a contiguous region. */ -if (hdrblobRead(fd, 1, 0, RPMTAG_HEADERSIGNATURES, sigblob, )) +/* Read

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-01-05 Thread Demi Marie Obenour
@DemiMarie commented on this pull request. > @@ -169,8 +169,8 @@ rpmRC rpmpkgRead(struct rpmvs_s *vs, FD_t fd, goto exit; } -/* Read the signature header. Might not be in a contiguous region. */ -if (hdrblobRead(fd, 1, 0, RPMTAG_HEADERSIGNATURES, sigblob, )) +/* Read

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-01-05 Thread Panu Matilainen
Do you have actual reproducers for these cases or is this just by code-analysis / compiler warnings? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2021-01-05 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -169,8 +169,8 @@ rpmRC rpmpkgRead(struct rpmvs_s *vs, FD_t fd, goto exit; } -/* Read the signature header. Might not be in a contiguous region. */ -if (hdrblobRead(fd, 1, 0, RPMTAG_HEADERSIGNATURES, sigblob, )) +/* Read

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2020-12-30 Thread Demi Marie Obenour
@DemiMarie commented on this pull request. > @@ -169,8 +169,8 @@ rpmRC rpmpkgRead(struct rpmvs_s *vs, FD_t fd, goto exit; } -/* Read the signature header. Might not be in a contiguous region. */ -if (hdrblobRead(fd, 1, 0, RPMTAG_HEADERSIGNATURES, sigblob, )) +/* Read

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2020-12-30 Thread Demi Marie Obenour
@DemiMarie pushed 5 commits. 5774a927b28c2056aed9bd9fc3e39605e0b071de Enable hardening flags where available 2b86b349a2f66f28a66080ddc9d8f6e76f9acbfb Check that len is in range before using it 69a79e4a240e6b82d537d6fc76b57ace55a0e17a Avoid incrementing a pointer past the end

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2020-12-30 Thread Demi Marie Obenour
@Conan-Kudo done -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1471#issuecomment-752321926___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2020-12-29 Thread Demi Marie Obenour
@DemiMarie commented on this pull request. > @@ -169,8 +169,8 @@ rpmRC rpmpkgRead(struct rpmvs_s *vs, FD_t fd, goto exit; } -/* Read the signature header. Might not be in a contiguous region. */ -if (hdrblobRead(fd, 1, 0, RPMTAG_HEADERSIGNATURES, sigblob, )) +/* Read

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2020-12-29 Thread ニール・ゴンパ
@DemiMarie Can you split up these changes into separate commits? That would make it easier to do partial merges as each change is approved. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2020-12-29 Thread ニール・ゴンパ
@Conan-Kudo requested changes on this pull request. > @@ -169,8 +169,8 @@ rpmRC rpmpkgRead(struct rpmvs_s *vs, FD_t fd, goto exit; } -/* Read the signature header. Might not be in a contiguous region. */ -if (hdrblobRead(fd, 1, 0, RPMTAG_HEADERSIGNATURES, sigblob, )) +

[Rpm-maint] [rpm-software-management/rpm] Harden against crafted inputs (#1471)

2020-12-29 Thread Demi Marie Obenour
This makes vulnerabilities less likely by: - Preventing an out-of-bounds read on 32-bit systems. - Adding `-fno-strict-overflow`, `-fwrapv`, and `-fwrapv-pointer` - Avoid some undefined pointer arithmetic - Requiring signature headers to be contiguous. You can view, comment on, or merge this pull