Welcome! Log In Create A New Profile

Advanced

[nginx] Mail: fixed segfault with ssl/starttls at mail{} level a...

Maxim Dounin
October 08, 2013 08:14AM
details: http://hg.nginx.org/nginx/rev/3ff1e663fa08
branches: stable-1.4
changeset: 5420:3ff1e663fa08
user: Maxim Dounin <mdounin@mdounin.ru>
date: Mon Sep 30 22:10:13 2013 +0400
description:
Mail: fixed segfault with ssl/starttls at mail{} level and no cert.

A configuration like "mail { starttls on; server {}}" triggered NULL
pointer dereference in ngx_mail_ssl_merge_conf() as conf->file was not set.

diffstat:

src/mail/ngx_mail_ssl_module.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff --git a/src/mail/ngx_mail_ssl_module.c b/src/mail/ngx_mail_ssl_module.c
--- a/src/mail/ngx_mail_ssl_module.c
+++ b/src/mail/ngx_mail_ssl_module.c
@@ -235,6 +235,11 @@ ngx_mail_ssl_merge_conf(ngx_conf_t *cf,
mode = "";
}

+ if (conf->file == NULL) {
+ conf->file = prev->file;
+ conf->line = prev->line;
+ }
+
if (*mode) {

if (conf->certificate.len == 0) {

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Mail: fixed segfault with ssl/starttls at mail{} level a...

Maxim Dounin 786 October 08, 2013 08:14AM



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

Online Users

Guests: 190
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