]> git.kaiwu.me - nginx.git/commit
Secure link: fixed stack buffer overflow.
authorRoman Arutyunyan <arut@nginx.com>
Tue, 22 Aug 2017 18:22:59 +0000 (21:22 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Tue, 22 Aug 2017 18:22:59 +0000 (21:22 +0300)
commit418124e21983aa53db4d99b7fd2eb0eee7ab4be0
treedd3f1bf912626dfc44915c2d2c1692d454a71f7c
parent6a2e4098331077037cb9c197f88a54f46d870068
Secure link: fixed stack buffer overflow.

When secure link checksum has length of 23 or 24 bytes, decoded base64 value
could occupy 17 or 18 bytes which is more than 16 bytes previously allocated
for it on stack.  The buffer overflow does not have any security implications
since only one local variable was corrupted and this variable was not used in
this case.

The fix is to increase buffer size up to 18 bytes.  Useless buffer size
initialization is removed as well.
src/http/modules/ngx_http_secure_link_module.c