pass: Remove use-after-free of policy->pass_table during pass_exit_resource() 15/158215/2
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 30 Oct 2017 09:46:32 +0000 (18:46 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 1 Nov 2017 06:17:46 +0000 (06:17 +0000)
commitb63111bdb8ca542aacee38375c9806d82617b2f8
tree95449a7f16e5b5b8ba35ea25030a1c682a52ae71
parent3b624382576a401807a4e69ffb387ae4c8a1dddd
pass: Remove use-after-free of policy->pass_table during pass_exit_resource()

During the pass_exit_resource(), pass_put_table() frees the
g_pass->policy->pass_table, and after that, pass_hotplug_stop() is
called and uses the pointer. Remove the use-after-free by clearing
policy->pass_table from pass_put_table() instead of
__pass_governor_exit() and checking null from pass_hot_plug_stop().

Change-Id: I00d57320dd9ed9f0bcaed406f066bdce37215656
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
src/pass/pass-gov.c
src/pass/pass-parser.c