Suhrud Patankar has uploaded this change for review. (
https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/468729 )
Change subject: heap use after free for component_log_level
......................................................................
heap use after free for component_log_level
In function log_conf_commit:
2568 if (component_log_level != default_log_levels)
2569 gsh_free(component_log_level);
2570 component_log_level = logger->comp_log_level;
component_log_level is a global pointer.
While the current thread is freeing and re-setting, If any other
thread is accessing the pointer after execution of line 2569
but before 2570 is fully executed it will hit use-after-free case.
Avoid changing component_log_level once set.
Change-Id: If44236e323f39473c590930f4ce8bd4fd127c5f7
Signed-off-by: ashish.sangwan <ashish.sangwan(a)nutanix.com>
---
M src/log/log_functions.c
1 file changed, 12 insertions(+), 5 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/29/468729/1
--
To view, visit
https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/468729
To unsubscribe, or for help writing mail filters, visit
https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: If44236e323f39473c590930f4ce8bd4fd127c5f7
Gerrit-Change-Number: 468729
Gerrit-PatchSet: 1
Gerrit-Owner: Suhrud Patankar <suhrudpatankar(a)gmail.com>
Gerrit-MessageType: newchange