Control: tags 1025120 + patch
Control: tags 1025120 + pending

Dear Ricardo,

I've prepared an NMU for libetpan (versioned as 1.9.4-3.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

I choosed delayed/2 as the change should be uncontroverial
(hopefully). If you want me to cancel it let it know. Once it enters
unstable it would be good to have the same change for bullseye as well
via a point release.

Regards,
Salvatore
diff -Nru libetpan-1.9.4/debian/changelog libetpan-1.9.4/debian/changelog
--- libetpan-1.9.4/debian/changelog	2021-01-10 18:39:40.000000000 +0100
+++ libetpan-1.9.4/debian/changelog	2022-12-29 09:42:05.000000000 +0100
@@ -1,3 +1,10 @@
+libetpan (1.9.4-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fixed crash when st_info_list is NULL (CVE-2022-4121) (Closes: #1025120)
+
+ -- Salvatore Bonaccorso <car...@debian.org>  Thu, 29 Dec 2022 09:42:05 +0100
+
 libetpan (1.9.4-3) unstable; urgency=medium
 
   * Patch from upstream commits fixing CVE-2020-15953 (Closes: #966647)
diff -Nru libetpan-1.9.4/debian/patches/15_Fixed-crash-when-st_info_list-is-NULL.-Fixes-420.-Fi.patch libetpan-1.9.4/debian/patches/15_Fixed-crash-when-st_info_list-is-NULL.-Fixes-420.-Fi.patch
--- libetpan-1.9.4/debian/patches/15_Fixed-crash-when-st_info_list-is-NULL.-Fixes-420.-Fi.patch	1970-01-01 01:00:00.000000000 +0100
+++ libetpan-1.9.4/debian/patches/15_Fixed-crash-when-st_info_list-is-NULL.-Fixes-420.-Fi.patch	2022-12-29 09:42:05.000000000 +0100
@@ -0,0 +1,35 @@
+From: Hoa Dinh <h...@dinhvh.me>
+Date: Mon, 19 Dec 2022 08:16:32 -0800
+Subject: Fixed crash when st_info_list is NULL. Fixes #420. Fixes
+ CVE-2022-4121.
+Origin: https://github.com/dinhvh/libetpan/commit/5c9eb6b6ba64c4eb927d7a902317410181aacbba
+Bug: https://github.com/dinhvh/libetpan/issues/420
+Bug-Debian: https://bugs.debian.org/1025120
+Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2022-4121
+
+---
+ src/low-level/imap/mailimap_types.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/low-level/imap/mailimap_types.c b/src/low-level/imap/mailimap_types.c
+index 9923125c5b62..79a0cc23a96d 100644
+--- a/src/low-level/imap/mailimap_types.c
++++ b/src/low-level/imap/mailimap_types.c
+@@ -1389,9 +1389,11 @@ void
+ mailimap_mailbox_data_status_free(struct mailimap_mailbox_data_status * info)
+ {
+   mailimap_mailbox_free(info->st_mailbox);
+-  clist_foreach(info->st_info_list, (clist_func) mailimap_status_info_free,
+-		 NULL);
+-  clist_free(info->st_info_list);
++  if (info->st_info_list != NULL) {
++    clist_foreach(info->st_info_list, (clist_func) mailimap_status_info_free,
++      NULL);
++    clist_free(info->st_info_list);
++  }
+   free(info);
+ }
+ 
+-- 
+2.39.0
+
diff -Nru libetpan-1.9.4/debian/patches/series libetpan-1.9.4/debian/patches/series
--- libetpan-1.9.4/debian/patches/series	2021-01-10 18:39:40.000000000 +0100
+++ libetpan-1.9.4/debian/patches/series	2022-12-29 09:42:05.000000000 +0100
@@ -3,3 +3,4 @@
 12_add_dummy_readme.diff
 13_fix_CVE-2020-15953.diff
 14_fix_encoding.diff
+15_Fixed-crash-when-st_info_list-is-NULL.-Fixes-420.-Fi.patch

Reply via email to