Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5ea7bc48a |
2 changed files with 52 additions and 1 deletions
45
ppp-2.4.9-CVE-2022-4603.patch
Normal file
45
ppp-2.4.9-CVE-2022-4603.patch
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
From a75fb7b198eed50d769c80c36629f38346882cbf Mon Sep 17 00:00:00 2001
|
||||
From: Paul Mackerras <paulus@ozlabs.org>
|
||||
Date: Thu, 4 Aug 2022 12:23:08 +1000
|
||||
Subject: [PATCH] pppdump: Avoid out-of-range access to packet buffer
|
||||
|
||||
This fixes a potential vulnerability where data is written to spkt.buf
|
||||
and rpkt.buf without a check on the array index. To fix this, we
|
||||
check the array index (pkt->cnt) before storing the byte or
|
||||
incrementing the count. This also means we no longer have a potential
|
||||
signed integer overflow on the increment of pkt->cnt.
|
||||
|
||||
Fortunately, pppdump is not used in the normal process of setting up a
|
||||
PPP connection, is not installed setuid-root, and is not invoked
|
||||
automatically in any scenario that I am aware of.
|
||||
|
||||
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
|
||||
---
|
||||
pppdump/pppdump.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pppdump/pppdump.c b/pppdump/pppdump.c
|
||||
index 2b815fc9b..b85a86271 100644
|
||||
--- a/pppdump/pppdump.c
|
||||
+++ b/pppdump/pppdump.c
|
||||
@@ -297,6 +297,10 @@ dumpppp(f)
|
||||
printf("%s aborted packet:\n ", dir);
|
||||
q = " ";
|
||||
}
|
||||
+ if (pkt->cnt >= sizeof(pkt->buf)) {
|
||||
+ printf("%s over-long packet truncated:\n ", dir);
|
||||
+ q = " ";
|
||||
+ }
|
||||
nb = pkt->cnt;
|
||||
p = pkt->buf;
|
||||
pkt->cnt = 0;
|
||||
@@ -400,7 +404,8 @@ dumpppp(f)
|
||||
c ^= 0x20;
|
||||
pkt->esc = 0;
|
||||
}
|
||||
- pkt->buf[pkt->cnt++] = c;
|
||||
+ if (pkt->cnt < sizeof(pkt->buf))
|
||||
+ pkt->buf[pkt->cnt++] = c;
|
||||
break;
|
||||
}
|
||||
}
|
||||
8
ppp.spec
8
ppp.spec
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Name: ppp
|
||||
Version: 2.4.9
|
||||
Release: 9%{?dist}
|
||||
Release: 10%{?dist}
|
||||
Summary: The Point-to-Point Protocol daemon
|
||||
License: BSD and LGPLv2+ and GPLv2+ and Public Domain
|
||||
URL: http://www.samba.org/ppp
|
||||
|
|
@ -43,6 +43,8 @@ Patch0027: ppp-2.4.9-pppd-eap-Fix-bug-causing-incorrect-response-length-3.pa
|
|||
Patch0028: ppp-2.4.9-pppd-Fix-logical-error-in-comparing-valid-encryption.patch
|
||||
# https://github.com/ppp-project/ppp/pull/267/commits/6bfe06b9428a60eb637d5450d65dd3932fe5a83f
|
||||
Patch0029: ppp-2.4.9-pppd-Expose-the-MPPE-keys-generated-through-an-API-2.patch
|
||||
# https://github.com/ppp-project/ppp/commit/a75fb7b198eed50d769c80c36629f38346882cbf
|
||||
Patch0030: ppp-2.4.9-CVE-2022-4603.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc
|
||||
|
|
@ -173,6 +175,10 @@ mkdir -p %{buildroot}%{_rundir}/ppp
|
|||
%doc PLUGINS
|
||||
|
||||
%changelog
|
||||
* Thu Jan 4 2024 Jaroslav Škarvada <jskarvad@redhat.com> - 2.4.9-10
|
||||
- Fixed improper validation of array index of the component pppdump
|
||||
Resolves: CVE-2022-4603
|
||||
|
||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.9-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue