Welcome! Log In Create A New Profile

Advanced

[nginx] Slab: improved double free detection.

December 03, 2016 02:08AM
details: http://hg.nginx.org/nginx/rev/87d7e640b45d
branches:
changeset: 6809:87d7e640b45d
user: Ruslan Ermilov <ru@nginx.com>
date: Sat Dec 03 10:01:39 2016 +0300
description:
Slab: improved double free detection.

Previously, an attempt to double free the starting page of the
free range was not detected.

diffstat:

src/core/ngx_slab.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 2af776c22aec -r 87d7e640b45d src/core/ngx_slab.c
--- a/src/core/ngx_slab.c Sat Dec 03 10:01:03 2016 +0300
+++ b/src/core/ngx_slab.c Sat Dec 03 10:01:39 2016 +0300
@@ -597,7 +597,7 @@ ngx_slab_free_locked(ngx_slab_pool_t *po
goto wrong_chunk;
}

- if (slab == NGX_SLAB_PAGE_FREE) {
+ if (!(slab & NGX_SLAB_PAGE_START)) {
ngx_slab_error(pool, NGX_LOG_ALERT,
"ngx_slab_free(): page is already free");
goto fail;

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

[nginx] Slab: improved double free detection.

ru@nginx.com 223 December 03, 2016 02:08AM



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

Online Users

Guests: 81
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready