public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Lubos Kardos <lkardos@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - Add check against malicious CPIO file name size
Date: Mon, 23 Nov 2026 09:29:15 GMT [thread overview]
Message-ID: <179542615503.1.1343448580506289375.rpms-rpm-2474acb1d0a3@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 2474acb1d0a34f108b2605b6271dc3ee1df33f5d
Author : Lubos Kardos <lkardos@redhat.com>
Date : 2014-12-12T17:06:03+01:00
Stats : +42/-1 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/2474acb1d0a34f108b2605b6271dc3ee1df33f5d?branch=pmatilai-v6
Log:
- Add check against malicious CPIO file name size
- Fixes CVE-2014-8118
- Resolves #1168715
- Fix race condidition where unchecked data is exposed in the file system
- Fixes CVE-2013-6435
- Resolves #1039811
---
diff --git a/rpm-4.12.0.x-CVE-2013-6435.patch b/rpm-4.12.0.x-CVE-2013-6435.patch
new file mode 100644
index 0000000..c093352
--- /dev/null
+++ b/rpm-4.12.0.x-CVE-2013-6435.patch
@@ -0,0 +1,16 @@
+--- rpm-4.12.0.1/lib/fsm.c.orig 2014-12-12 16:05:51.683430313 +0100
++++ rpm-4.12.0.1/lib/fsm.c 2014-12-12 16:08:28.046025597 +0100
+@@ -215,7 +215,12 @@ static int expandRegular(rpmfi fi, const
+ FD_t wfd = NULL;
+ int rc = 0;
+
+- wfd = Fopen(dest, "w.ufdio");
++ /* Create the file with 000 permissions. */
++ {
++ mode_t old_umask = umask(0777);
++ wfd = Fopen(dest, "w.ufdio");
++ umask(old_umask);
++ }
+ if (Ferror(wfd)) {
+ rc = RPMERR_OPEN_FAILED;
+ goto exit;
diff --git a/rpm-4.12.0.x-CVE-2014-8118.patch b/rpm-4.12.0.x-CVE-2014-8118.patch
new file mode 100644
index 0000000..cabdb33
--- /dev/null
+++ b/rpm-4.12.0.x-CVE-2014-8118.patch
@@ -0,0 +1,14 @@
+diff --git a/lib/cpio.c b/lib/cpio.c
+index 253ff0f..600633a 100644
+--- a/lib/cpio.c
++++ b/lib/cpio.c
+@@ -399,6 +399,9 @@ int rpmcpioHeaderRead(rpmcpio_t cpio, char ** path, int * fx)
+
+ GET_NUM_FIELD(hdr.filesize, fsize);
+ GET_NUM_FIELD(hdr.namesize, nameSize);
++ if (nameSize <= 0 || nameSize > 4096) {
++ return RPMERR_BAD_HEADER;
++ }
+
+ char name[nameSize + 1];
+ read = Fread(name, nameSize, 1, cpio->fd);
diff --git a/rpm.spec b/rpm.spec
index 7d710df..bc7238e 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -27,7 +27,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}4%{?dist}
+Release: %{?snapver:0.%{snapver}.}5%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/rpm-4.12.x/%{name}-%{srcver}.tar.bz2
@@ -67,6 +67,10 @@ Patch305: rpm-4.10.0-dwz-debuginfo.patch
Patch306: rpm-4.10.0-minidebuginfo.patch
# Fix CRC32 after dwz (#971119)
Patch307: rpm-4.11.1-sepdebugcrcfix.patch
+# Fix race condidition where unchecked data is exposed in the file system
+Patch308: rpm-4.12.0.x-CVE-2013-6435.patch
+# Add check against malicious CPIO file name size
+Patch309: rpm-4.12.0.x-CVE-2014-8118.patch
# Partially GPL/LGPL dual-licensed and some bits with BSD
# SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD
@@ -536,6 +540,13 @@ exit 0
%doc doc/librpm/html/*
%changelog
+* Fri Dec 12 2014 Lubos Kardos <lkardos@redhat.com> - 4.12.0.1-5
+- Add check against malicious CPIO file name size (#1168715)
+- Fixes CVE-2014-8118
+- Fix race condidition where unchecked data is exposed in the file system
+ (#1039811)
+- Fixes CVE-2013-6435
+
* Thu Oct 30 2014 Panu Matilainen <pmatilai@redhat.com> - 4.12.0.1-4
- Axe unused generator scripts forcing a perl dependency (#1158580, #1158583)
reply other threads:[~2026-11-23 9:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179542615503.1.1343448580506289375.rpms-rpm-2474acb1d0a3@fedoraproject.org \
--to=lkardos@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox