e_process: use eina_hash_int32_new instead of eina_hash_pointer_new when make hash... 19/275719/1 accepted/tizen/unified/20220602.131728 submit/tizen/20220531.045627
authorJunseok Kim <juns.kim@samsung.com>
Thu, 26 May 2022 09:36:03 +0000 (18:36 +0900)
committerJunseok Kim <juns.kim@samsung.com>
Tue, 31 May 2022 02:04:11 +0000 (11:04 +0900)
there was a stack buffer overflow issue when access to pinfo hash on aarch64 system.
it caused by eina_hash_pointer_new (int64) to create hash using pid key (int32).
thus, stack overflow issue when memcpy on eina_hash_add.
for fix this issue, changed to eina_hash_int32_new instead of eina_hash_pointer_new.

Change-Id: I92fc6ef9778416f219af33b4c0ff4f571b3c3edf

src/bin/e_process.c

index 29af2003c49871dfd5e645d35e69ea519d2b0356..e910570de7422046546d998aeda193f2e748d23f 100644 (file)
@@ -598,7 +598,7 @@ _e_process_manager_new(void)
    pm = E_NEW(E_Process_Manager, 1);
    EINA_SAFETY_ON_NULL_RETURN_VAL(pm, NULL);
 
-   pm->pids_hash = eina_hash_pointer_new(NULL);
+   pm->pids_hash = eina_hash_int32_new(NULL);
    if (!pm->pids_hash) goto error;
 
    return pm;