Merge ~michal-maloszewski99/ubuntu/+source/nginx:lp-1957320-jammy-nginx into ubuntu/+source/nginx:ubuntu/jammy-devel

Proposed by Michał Małoszewski
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merged at revision: caca96eed6c8c79794561f5e8306ef384eadcded
Proposed branch: ~michal-maloszewski99/ubuntu/+source/nginx:lp-1957320-jammy-nginx
Merge into: ubuntu/+source/nginx:ubuntu/jammy-devel
Diff against target: 84 lines (+62/-0)
3 files modified
debian/changelog (+9/-0)
debian/patches/lp1957320-jammy-fixed-sigquit-issue-with-unix-sockets.patch (+52/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Athos Ribeiro (community) Approve
Canonical Server Reporter Pending
Review via email: mp+443827@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michał Małoszewski (michal-maloszewski99) :
Revision history for this message
Michał Małoszewski (michal-maloszewski99) wrote :

SRU template attached to the bug report

Revision history for this message
Michał Małoszewski (michal-maloszewski99) wrote :
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

LGTM

review: Approve
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Uploaded.

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading nginx_1.18.0-6ubuntu14.4.dsc: done.
  Uploading nginx_1.18.0-6ubuntu14.4.debian.tar.xz: done.
  Uploading nginx_1.18.0-6ubuntu14.4_source.buildinfo: done.
  Uploading nginx_1.18.0-6ubuntu14.4_source.changes: done.
Successfully uploaded packages.

Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: athos-ribeiro, michal-maloszewski99
Uploaders: athos-ribeiro
MP auto-approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index bf9b733..03793c9 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+nginx (1.18.0-6ubuntu14.4) jammy; urgency=medium
7+
8+ * d/p/lp1957320-jammy-fixed-sigquit-issue-with-unix-sockets.patch:
9+ Fix SIGQUIT by replacing the custom socket closing code in the
10+ ngx_process_cycle.c file by calling another function.
11+ (LP: #1957320)
12+
13+ -- Michal Maloszewski <michal.maloszewski@canonical.com> Tue, 30 May 2023 19:31:46 +0200
14+
15 nginx (1.18.0-6ubuntu14.3) jammy-security; urgency=medium
16
17 * SECURITY UPDATE: memory corruption/disclosure issue
18diff --git a/debian/patches/lp1957320-jammy-fixed-sigquit-issue-with-unix-sockets.patch b/debian/patches/lp1957320-jammy-fixed-sigquit-issue-with-unix-sockets.patch
19new file mode 100644
20index 0000000..d2c830c
21--- /dev/null
22+++ b/debian/patches/lp1957320-jammy-fixed-sigquit-issue-with-unix-sockets.patch
23@@ -0,0 +1,52 @@
24+From 9c3ac44de268f0cf057bc5dd67929e74c9bbc3e3 Mon Sep 17 00:00:00 2001
25+From: Ruslan Ermilov <ru@nginx.com>
26+Date: Mon, 1 Jun 2020 22:31:23 +0300
27+Subject: [PATCH] Fixed SIGQUIT not removing listening UNIX sockets (closes
28+ #753).
29+
30+Listening UNIX sockets were not removed on graceful shutdown, preventing
31+the next runs. The fix is to replace the custom socket closing code in
32+ngx_master_process_cycle() by the ngx_close_listening_sockets() call.
33+
34+Origin: upstream, https://github.com/nginx/nginx/commit/9c3ac44de268f0cf057bc5dd67929e74c9bbc3e3
35+Bug: https://trac.nginx.org/nginx/ticket/753
36+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/1957320
37+Last-Update: 2023-05-30
38+---
39+ src/os/unix/ngx_process_cycle.c | 14 ++------------
40+ 1 file changed, 2 insertions(+), 12 deletions(-)
41+
42+--- a/src/os/unix/ngx_process_cycle.c
43++++ b/src/os/unix/ngx_process_cycle.c
44+@@ -77,12 +77,11 @@
45+ u_char *p;
46+ size_t size;
47+ ngx_int_t i;
48+- ngx_uint_t n, sigio;
49++ ngx_uint_t sigio;
50+ sigset_t set;
51+ struct itimerval itv;
52+ ngx_uint_t live;
53+ ngx_msec_t delay;
54+- ngx_listening_t *ls;
55+ ngx_core_conf_t *ccf;
56+
57+ sigemptyset(&set);
58+@@ -204,16 +203,7 @@
59+ if (ngx_quit) {
60+ ngx_signal_worker_processes(cycle,
61+ ngx_signal_value(NGX_SHUTDOWN_SIGNAL));
62+-
63+- ls = cycle->listening.elts;
64+- for (n = 0; n < cycle->listening.nelts; n++) {
65+- if (ngx_close_socket(ls[n].fd) == -1) {
66+- ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_socket_errno,
67+- ngx_close_socket_n " %V failed",
68+- &ls[n].addr_text);
69+- }
70+- }
71+- cycle->listening.nelts = 0;
72++ ngx_close_listening_sockets(cycle);
73+
74+ continue;
75+ }
76diff --git a/debian/patches/series b/debian/patches/series
77index 702a7c7..cc4eaef 100644
78--- a/debian/patches/series
79+++ b/debian/patches/series
80@@ -8,3 +8,4 @@ CVE-2021-23017-2.patch
81 CVE-2021-3618.patch
82 ssl-op-ignore-unexpected-eof-option.patch
83 CVE-2022-41741_41742.patch
84+lp1957320-jammy-fixed-sigquit-issue-with-unix-sockets.patch

Subscribers

People subscribed via source and target branches