Compare commits

..

No commits in common. 'c9' and 'i10c-beta' have entirely different histories.

2
.gitignore vendored

@ -1 +1 @@
SOURCES/libndp-1.8.tar.gz
SOURCES/libndp-1.9.tar.gz

@ -1 +1 @@
c3a63a27574a0af9a893a395a4916314bb596292 SOURCES/libndp-1.8.tar.gz
513116ccc60b0427516564693b6d41fe53953e05 SOURCES/libndp-1.9.tar.gz

@ -1,44 +0,0 @@
From 05e4ba7b0d126eea4c04387dcf40596059ee24af Mon Sep 17 00:00:00 2001
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Wed, 5 Jun 2024 11:57:43 +0800
Subject: [PATCH] libndp: valid route information option length
RFC 4191 specifies that the Route Information Option Length should be 1, 2,
or 3, depending on the Prefix Length. A malicious node could potentially
trigger a buffer overflow and crash the tool by sending an IPv6 router
advertisement message containing the "Route Information" option with a
"Length" field larger than 3.
To address this, add a check on the length field.
Fixes: 8296a5bf0755 ("add support for Route Information Option (rfc4191)")
Reported-by: Evgeny Vereshchagin <evverx@gmail.com>
Suggested-by: Felix Maurer <fmaurer@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
---
libndp/libndp.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/libndp/libndp.c b/libndp/libndp.c
index 6314717..72ec92e 100644
--- a/libndp/libndp.c
+++ b/libndp/libndp.c
@@ -1231,6 +1231,17 @@ static bool ndp_msg_opt_route_check_valid(void *opt_data)
*/
if (((ri->nd_opt_ri_prf_reserved >> 3) & 3) == 2)
return false;
+
+ /* The Length field is 1, 2, or 3 depending on the Prefix Length.
+ * If Prefix Length is greater than 64, then Length must be 3.
+ * If Prefix Length is greater than 0, then Length must be 2 or 3.
+ * If Prefix Length is zero, then Length must be 1, 2, or 3.
+ */
+ if (ri->nd_opt_ri_len > 3 ||
+ (ri->nd_opt_ri_prefix_len > 64 && ri->nd_opt_ri_len != 3) ||
+ (ri->nd_opt_ri_prefix_len > 0 && ri->nd_opt_ri_len == 1))
+ return false;
+
return true;
}

@ -1,11 +1,10 @@
Name: libndp
Version: 1.8
Release: 6%{?dist}
Version: 1.9
Release: 1%{?dist}
Summary: Library for Neighbor Discovery Protocol
License: LGPL-2.1-or-later
URL: http://www.libndp.org/
Source: http://www.libndp.org/files/libndp-%{version}.tar.gz
Patch0: 0000-libndp-valid-route-information-option-length.patch
BuildRequires: gcc
BuildRequires: make
@ -24,7 +23,6 @@ necessary for developing programs using libndp.
%prep
%setup -q
%patch -p1 -P 0
%build
%configure --disable-static
@ -48,25 +46,41 @@ find $RPM_BUILD_ROOT -name \*.la -delete
%{_libdir}/pkgconfig/*.pc
%changelog
* Wed Jul 10 2024 Felix Maurer <fmaurer@redhat.com> - 1.8-6
- Validate route information option length
* Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1.9-1
- Rebuilt for MSVSphere 10
* Wed Nov 15 2023 Hangbin Liu <haliu@redhat.com> - 1.8-5
- Convert the license tag to SPDX format
Related: RHELMISC-1363
* Wed Jul 10 2024 Felix Maurer <fmaurer@redhat.com> - 1.9-1
- Update to libndp 1.9
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.8-4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.8-10
- Bump release for June 2024 mass rebuild
* Tue Jun 1 2021 Hangbin Liu <haliu@redhat.com> - 1.8-3
- Update tcpreplay version in OSCI gating tests (rhbz#1958933)
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed May 26 2021 Hangbin Liu <haliu@redhat.com> - 1.8-2
- Add OSCI gating tests (rhbz#1958933)
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri May 21 2021 Hangbin Liu <haliu@redhat.com> - 1.8-1
- 1.8 release (rhbz#1958933)
* Mon Oct 09 2023 Eric Garver <eric@garver.life> - 1.8-7
- migrated to SPDX license
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu May 20 2021 Jiri Pirko <jiri@nvidia.com> - 1.8-1
- 1.8 release
- libndp,ndptool: use poll() instead of select()
- libndp: avoid static buffer for debug string in ndp_sock_recv()
- ndptool: avoid static buffer for string in ndptool
@ -80,9 +94,6 @@ find $RPM_BUILD_ROOT -name \*.la -delete
- ndptool: fix target parameter typo
- ndptool: add -T target support
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.7-8
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

Loading…
Cancel
Save