annotate auto/lib/make @ 9112:d59277dd3d8c

QUIC: fixed post-close use-after-free. Previously, ngx_quic_close_connection() could be called in a way that QUIC connection was accessed after the call. In most cases the connection is not closed right away, but close timeout is scheduled. However, it's not always the case. Also, if the close process started earlier for a different reason, calling ngx_quic_close_connection() may actually close the connection. The connection object should not be accessed after that. Now, when possible, return statement is added to eliminate post-close connection object access. In other places ngx_quic_close_connection() is substituted with posting close event. Also, the new way of closing connection in ngx_quic_stream_cleanup_handler() fixes another problem in this function. Previously it passed stream connection instead of QUIC connection to ngx_quic_close_connection(). This could result in incomplete connection shutdown. One consequence of that could be that QUIC streams were freed without shutting down their application contexts. This could result in another use-after-free. Found by Coverity (CID 1530402).
author Roman Arutyunyan <arut@nginx.com>
date Mon, 22 May 2023 15:59:42 +0400
parents 9eefb38f0005
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
444
42d11f017717 nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents: 399
diff changeset
1
42d11f017717 nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents: 399
diff changeset
2 # Copyright (C) Igor Sysoev
4412
d620f497c50f Copyright updated.
Maxim Konovalov <maxim@nginx.com>
parents: 3363
diff changeset
3 # Copyright (C) Nginx, Inc.
444
42d11f017717 nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents: 399
diff changeset
4
286
fc8dc489247e nginx-0.0.2-2004-03-12-00:34:52 import
Igor Sysoev <igor@sysoev.ru>
parents: 282
diff changeset
5
320
d621239c30f7 nginx-0.0.3-2004-04-18-23:06:02 import
Igor Sysoev <igor@sysoev.ru>
parents: 297
diff changeset
6 if [ $PCRE != NONE -a $PCRE != NO -a $PCRE != YES ]; then
286
fc8dc489247e nginx-0.0.2-2004-03-12-00:34:52 import
Igor Sysoev <igor@sysoev.ru>
parents: 282
diff changeset
7 . auto/lib/pcre/make
fc8dc489247e nginx-0.0.2-2004-03-12-00:34:52 import
Igor Sysoev <igor@sysoev.ru>
parents: 282
diff changeset
8 fi
195
8dee38ea9117 nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
9
399
4e21d1291a14 nginx-0.0.7-2004-07-25-22:34:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 320
diff changeset
10 if [ $OPENSSL != NONE -a $OPENSSL != NO -a $OPENSSL != YES ]; then
4e21d1291a14 nginx-0.0.7-2004-07-25-22:34:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 320
diff changeset
11 . auto/lib/openssl/make
4e21d1291a14 nginx-0.0.7-2004-07-25-22:34:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 320
diff changeset
12 fi
4e21d1291a14 nginx-0.0.7-2004-07-25-22:34:14 import
Igor Sysoev <igor@sysoev.ru>
parents: 320
diff changeset
13
320
d621239c30f7 nginx-0.0.3-2004-04-18-23:06:02 import
Igor Sysoev <igor@sysoev.ru>
parents: 297
diff changeset
14 if [ $ZLIB != NONE -a $ZLIB != NO -a $ZLIB != YES ]; then
282
30310107dbc9 nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents: 274
diff changeset
15 . auto/lib/zlib/make
30310107dbc9 nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents: 274
diff changeset
16 fi
599
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
17
3363
b4aa418af6ef libatomic_ops support
Igor Sysoev <igor@sysoev.ru>
parents: 653
diff changeset
18 if [ $NGX_LIBATOMIC != NO -a $NGX_LIBATOMIC != YES ]; then
b4aa418af6ef libatomic_ops support
Igor Sysoev <igor@sysoev.ru>
parents: 653
diff changeset
19 . auto/lib/libatomic/make
b4aa418af6ef libatomic_ops support
Igor Sysoev <igor@sysoev.ru>
parents: 653
diff changeset
20 fi
b4aa418af6ef libatomic_ops support
Igor Sysoev <igor@sysoev.ru>
parents: 653
diff changeset
21
6419
39a806ccf21e Dynamic modules: perl.
Ruslan Ermilov <ru@nginx.com>
parents: 4412
diff changeset
22 if [ $USE_PERL != NO ]; then
599
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
23 . auto/lib/perl/make
869b6444d234 nginx-0.3.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
24 fi