From e5ab0fe9f1b4fd3390fea8eca8abe3f179b66e17 Mon Sep 17 00:00:00 2001 From: xinghe Date: Thu, 11 Apr 2024 02:07:22 +0000 Subject: [PATCH] fix CVE-2024-2397 and fix param type (cherry picked from commit 1783d5df5eb6c630fefcde69549c551ea2976214) --- backport-0002-CVE-2024-2397.patch | 2 +- tcpdump.spec | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/backport-0002-CVE-2024-2397.patch b/backport-0002-CVE-2024-2397.patch index 98bbbf4..3478eda 100644 --- a/backport-0002-CVE-2024-2397.patch +++ b/backport-0002-CVE-2024-2397.patch @@ -78,7 +78,7 @@ index 2cf06c363..9aed23eb9 100644 - se = ndo->ndo_snapend; - ndo->ndo_packetp = b; - ndo->ndo_snapend = t; -+ if (!nd_push_buffer(ndo, b, b, (u_int)(t - b))) { ++ if (!nd_push_buffer(ndo, b, b, t)) { + free(b); + (*ndo->ndo_error)(ndo, S_ERR_ND_MEM_ALLOC, + "%s: can't push buffer on buffer stack", __func__); diff --git a/tcpdump.spec b/tcpdump.spec index 0c53d5f..b6e64b5 100644 --- a/tcpdump.spec +++ b/tcpdump.spec @@ -1,7 +1,7 @@ Name: tcpdump Epoch: 14 Version: 4.99.1 -Release: 7 +Release: 8 Summary: A network traffic monitoring tool License: BSD with advertising URL: http://www.tcpdump.org @@ -94,6 +94,12 @@ make check %{_mandir}/man8/tcpdump.8* %changelog +* Thu Apr 11 2024 xinghe - 14:4.99.1-8 +- Type:CVE +- CVE:CVE-2024-2397 +- SUG:NA +- DESC:fix CVE-2024-2397 and fix param type + * Mon Apr 08 2024 xinghe - 14:4.99.1-7 - Type:CVE - CVE:CVE-2024-2397 -- Gitee