Welcome! Log In Create A New Profile

Advanced

Re: [nginx] Restored zeroing of ngx_channel_t in ngx_pass_open_channel().

Frank Liu
April 22, 2021 03:44PM
How does this impact 1.20.0? Shall we wait for 1.20.1?

On Thu, Apr 22, 2021 at 6:19 AM Ruslan Ermilov <ru@nginx.com> wrote:

> details: https://hg.nginx.org/nginx/rev/f2ff291bbdac
> branches:
> changeset: 7830:f2ff291bbdac
> user: Ruslan Ermilov <ru@nginx.com>
> date: Thu Apr 22 16:12:52 2021 +0300
> description:
> Restored zeroing of ngx_channel_t in ngx_pass_open_channel().
>
> Due to structure's alignment, some uninitialized memory contents may have
> been passed between processes.
>
> Zeroing was removed in 0215ec9aaa8a.
>
> Reported by Johnny Wang.
>
> diffstat:
>
> src/os/unix/ngx_process_cycle.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diffs (12 lines):
>
> diff -r 2851e4c7de03 -r f2ff291bbdac src/os/unix/ngx_process_cycle.c
> --- a/src/os/unix/ngx_process_cycle.c Wed Apr 21 23:24:59 2021 +0300
> +++ b/src/os/unix/ngx_process_cycle.c Thu Apr 22 16:12:52 2021 +0300
> @@ -398,6 +398,8 @@ ngx_pass_open_channel(ngx_cycle_t *cycle
> ngx_int_t i;
> ngx_channel_t ch;
>
> + ngx_memzero(&ch, sizeof(ngx_channel_t));
> +
> ch.command = NGX_CMD_OPEN_CHANNEL;
> ch.pid = ngx_processes[ngx_process_slot].pid;
> ch.slot = ngx_process_slot;
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Restored zeroing of ngx_channel_t in ngx_pass_open_channel().

ru@nginx.com 654 April 22, 2021 09:20AM

Re: [nginx] Restored zeroing of ngx_channel_t in ngx_pass_open_channel().

Frank Liu 230 April 22, 2021 03:44PM

Re: [nginx] Restored zeroing of ngx_channel_t in ngx_pass_open_channel().

Maxim Dounin 268 April 22, 2021 04:36PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 169
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready