Frantisek Sumsal
9b412709f2
core: free the strings in the set as well during unit cleanup
Spotted while fuzzing #27890.
=================================================================
==908098==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 64 byte(s) in 1 object(s) allocated from:
#0 0x7f4efe6d81f5 in __interceptor_realloc.part.0 (/lib64/libasan.so.8+0xd81f5) (BuildId: dc689b05ca2577037af24700212bb5cce1f91c8a)
#1 0x7f4efb8e3ace in greedy_realloc ../src/basic/alloc-util.c:70
#2 0x7f4efb93b713 in extract_first_word ../src/basic/extract-word.c:62
#3 0x7f4efb970d50 in set_put_strsplit ../src/basic/hashmap.c:1902
#4 0x7f4efd76c27e in exec_context_deserialize ../src/core/execute-serialize.c:3341
#5 0x7f4efd778dcb in exec_deserialize ../src/core/execute-serialize.c:4122
#6 0x4032c0 in LLVMFuzzerTestOneInput ../src/core/fuzz-execute-serialize.c:60
#7 0x403c58 in main ../src/fuzz/fuzz-main.c:50
#8 0x7f4efecccb49 in __libc_start_call_main (/lib64/libc.so.6+0x27b49) (BuildId: 245240a31888ad5c11bbc55b18e02d87388f59a9)
#9 0x7f4efecccc0a in __libc_start_main_alias_2 (/lib64/libc.so.6+0x27c0a) (BuildId: 245240a31888ad5c11bbc55b18e02d87388f59a9)
#10 0x402344 in _start (/home/mrc0mmand/repos/@systemd/systemd/build-san/fuzz-execute-serialize+0x402344) (BuildId: 195f382cf1e39b9ba48d6dcf5a90f786d72837a8)
SUMMARY: AddressSanitizer: 64 byte(s) leaked in 1 allocation(s).
Aborted (core dumped)
==911550==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 17 byte(s) in 1 object(s) allocated from:
#0 0x4df281 in strdup (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x4df281) (BuildId: 4e58706e607b8be7972d83c421bc0b625d509ec6)
#1 0x7fe4ae2b38fc in _set_put_strndup_full /home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/../src/basic/hashmap.c:1868:21
#2 0x7fe4b0bad897 in exec_context_deserialize /home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/../src/core/execute-serialize.c:3914:29
#3 0x7fe4b0b80592 in exec_deserialize /home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/../src/core/execute-serialize.c:4109:13
#4 0x531d0f in LLVMFuzzerTestOneInput /home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/../src/core/fuzz-execute-serialize.c:59:16
#5 0x440594 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x440594) (BuildId: 4e58706e607b8be7972d83c421bc0b625d509ec6)
#6 0x43f9b9 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x43f9b9) (BuildId: 4e58706e607b8be7972d83c421bc0b625d509ec6)
#7 0x440fd5 in fuzzer::Fuzzer::MutateAndTestOne() (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x440fd5) (BuildId: 4e58706e607b8be7972d83c421bc0b625d509ec6)
#8 0x441955 in fuzzer::Fuzzer::Loop(std::vector<fuzzer::SizedFile, std::allocator<fuzzer::SizedFile>>&) (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x441955) (BuildId: 4e58706e607b8be7972d83c421bc0b625d509ec6)
#9 0x42e151 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x42e151) (BuildId: 4e58706e607b8be7972d83c421bc0b625d509ec6)
#10 0x45a916 in main (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x45a916) (BuildId: 4e58706e607b8be7972d83c421bc0b625d509ec6)
#11 0x7fe4ac449b49 in __libc_start_call_main (/lib64/libc.so.6+0x27b49) (BuildId: 245240a31888ad5c11bbc55b18e02d87388f59a9)
#12 0x7fe4ac449c0a in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x27c0a) (BuildId: 245240a31888ad5c11bbc55b18e02d87388f59a9)
#13 0x422b74 in _start (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x422b74) (BuildId: 4e58706e607b8be7972d83c421bc0b625d509ec6)
SUMMARY: AddressSanitizer: 17 byte(s) leaked in 1 allocation(s).
2023-07-28 12:59:11 +02:00
..
2023-04-24 17:10:08 +02:00
2022-12-23 22:11:00 +09:00
2023-06-23 10:02:15 +02:00
2022-11-11 16:31:32 +01:00
2023-07-02 11:10:12 +01:00
2023-06-26 13:05:56 +02:00
2023-04-18 08:22:21 +02:00
2022-12-19 15:00:57 +01:00
2022-11-08 13:41:13 +01:00
2023-07-28 12:59:11 +02:00
2023-04-27 12:18:32 +02:00
2023-06-30 22:01:02 +02:00
2022-10-14 01:59:12 -07:00
2022-11-17 22:38:14 +09:00
2023-06-30 21:59:32 +02:00
2023-03-01 09:43:23 +01:00
2023-06-22 16:07:09 +02:00
2023-04-13 06:44:27 +02:00
2023-06-08 11:16:26 +02:00
2023-07-06 12:20:04 +01:00
2023-05-11 19:25:38 +09:00
2022-12-19 15:00:57 +01:00
2022-11-24 19:41:28 +09:00
2023-07-06 14:33:52 +02:00
2023-03-29 18:53:20 +02:00
2023-06-01 22:14:59 +02:00
2023-07-22 23:27:27 +01:00
2022-12-08 00:54:53 +01:00
2023-06-01 20:33:17 +02:00
2023-02-23 15:09:13 +09:00
2023-06-13 14:17:25 +02:00
2023-05-19 15:18:23 +01:00
2023-07-12 20:05:18 +02:00
2022-10-26 01:50:23 +09:00
2023-05-05 09:10:56 +02:00
2023-03-27 14:47:30 +02:00
2022-12-19 15:00:57 +01:00
2022-11-14 15:21:58 +01:00
2023-06-22 10:33:13 +01:00
2023-06-22 10:33:13 +01:00
2023-07-28 12:59:11 +02:00
2023-07-12 15:54:33 +02:00
2023-07-08 10:41:44 +01:00
2023-06-01 06:48:47 +09:00
2022-12-19 15:00:57 +01:00
2023-07-11 15:24:01 +01:00
2023-07-12 18:25:45 +02:00
2023-07-12 18:25:45 +02:00
2022-11-08 18:21:10 +01:00
2023-05-30 14:48:38 +02:00
2023-05-15 15:04:38 +08:00
2023-07-22 23:27:27 +01:00
2023-07-06 14:33:52 +02:00
2023-07-06 14:33:52 +02:00
2023-07-24 11:36:16 +01:00
2023-06-01 06:48:47 +09:00
2022-10-13 07:47:42 +09:00
2023-05-19 15:18:23 +01:00
2023-07-06 12:20:04 +01:00
2023-06-02 16:49:38 +02:00
2023-06-12 14:45:42 +09:00
2023-07-14 23:06:18 +01:00
2023-03-27 14:47:30 +02:00
2023-07-18 17:26:02 +01:00
2023-07-18 17:26:02 +01:00
2023-02-20 12:33:57 +09:00
2023-05-19 15:18:23 +01:00
2023-07-22 23:27:27 +01:00
2023-04-29 08:54:29 +09:00
2022-12-19 15:00:57 +01:00
2023-07-22 23:27:27 +01:00
2022-11-24 19:41:28 +09:00
2022-12-07 15:25:37 +01:00
2022-12-07 15:26:18 +01:00
2023-07-22 23:27:27 +01:00
2023-07-06 14:33:52 +02:00
2022-12-19 15:00:57 +01:00
2023-07-22 23:27:27 +01:00
2022-12-19 15:00:57 +01:00
2023-07-22 23:27:27 +01:00
2023-06-01 22:14:59 +02:00
2023-07-14 23:06:18 +01:00
2023-03-27 14:47:30 +02:00
2023-03-09 23:43:17 +09:00
2023-07-22 23:27:27 +01:00
2023-07-22 23:27:27 +01:00
2023-07-22 23:27:27 +01:00
2023-07-05 08:15:35 +08:00
2023-07-05 08:15:35 +08:00
2023-07-05 08:15:35 +08:00
2023-06-28 22:01:55 +02:00
2023-07-22 23:27:27 +01:00
2023-07-22 23:27:27 +01:00
2023-07-22 23:27:27 +01:00
2023-03-09 23:43:17 +09:00