https://bz.apache.org/bugzilla/show_bug.cgi?id=69116
Bug ID: 69116
Summary: ssl_hook_Access_classic: cert_stack leaked in select
early return paths
Product: Apache httpd-2
Version: 2.5-HEAD
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: mod_ssl
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Memory is allocated on the heap using sk_X509_new_null() (lines 910-911) [1],
but is not subsequently freed in all early return paths. For example, the early
return path taken directly below does not free the memory on line 920 [2].
The only spot where it appears that the memory is being actively freed is line
954 [3], which is past several early return statements in the function.
`cert_stack` is also allocated on the stack as seen on line 893 [4], so some
care might be required when managing the temporary memory allocated later on in
the function [1].
This issue exists on 2.4 as well as trunk.
Reported by Coverity.
1.
https://github.com/apache/httpd/blob/71202d890a49eba195c46c4348cdc61d776b103c/modules/ssl/ssl_engine_kernel.c#L910-L911
2.
https://github.com/apache/httpd/blob/71202d890a49eba195c46c4348cdc61d776b103c/modules/ssl/ssl_engine_kernel.c#L920
3.
https://github.com/apache/httpd/blob/71202d890a49eba195c46c4348cdc61d776b103c/modules/ssl/ssl_engine_kernel.c#L954
4.
https://github.com/apache/httpd/blob/71202d890a49eba195c46c4348cdc61d776b103c/modules/ssl/ssl_engine_kernel.c#L893
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]