nuttx/sched/group
chao an fdc3c44cc4 sched/group: fix task info heap-use-after-free
tg_info is still in use after task_uninit_info(), unifies
lib_stream_* with life cycle of task info to avoid this issue.

| ==1940861==ERROR: AddressSanitizer: heap-use-after-free on address 0xf47032e0 at pc 0x5676dc4f bp 0xf2f38c68 sp 0xf2f38c58
|
|#10 0xf7abec89 in __asan::__asan_report_load2 (addr=4100993760) at ../../../../src/libsanitizer/asan/asan_rtl.cpp:119
|#11 0x5677356a in nxsem_destroy (sem=0xf47032e0) at semaphore/sem_destroy.c:73
|#12 0x56773695 in sem_destroy (sem=0xf47032e0) at semaphore/sem_destroy.c:120
|#13 0x5676faa2 in nxmutex_destroy (mutex=0xf47032e0) at include/nuttx/mutex.h:126
|#14 0x567a3430 in lib_stream_release (group=0xf4901ba0) at stdio/lib_libstream.c:98
|#15 0x5676da75 in group_release (group=0xf4901ba0) at group/group_leave.c:162
|#16 0x5676e51c in group_leave (tcb=0xf5377740) at group/group_leave.c:360
|#17 0x569fe79b in nxtask_exithook (tcb=0xf5377740, status=0) at task/task_exithook.c:455
|#18 0x569f90b9 in _exit (status=0) at task/exit.c:82
|#19 0x56742680 in exit (status=0) at stdlib/lib_exit.c:61
|#20 0x56a69c78 in iperf_showusage (progname=0xf2f28838 "iperf", exitcode=0) at iperf_main.c:91
|#21 0x56a6a6ec in iperf_main (argc=1, argv=0xf2f28830) at iperf_main.c:140
|#22 0x5679c148 in nxtask_startup (entrypt=0x56a69c78 <iperf_main>, argc=1, argv=0xf2f28830) at sched/task_startup.c:70
|#23 0x56767f58 in nxtask_start () at task/task_start.c:134

Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-11 01:53:59 +08:00
..
group_addrenv.c sched/group: addrenv: allocate current group for each cpu 2022-05-08 20:34:31 +03:00
group_childstatus.c group/child_status: Dynamically expand group child_status 2021-07-15 20:14:57 -07:00
group_continue.c nuttx/sched: merge up_block_task and up_unblock_task 2022-11-22 22:59:08 +08:00
group_create.c sched/group: fix task info heap-use-after-free 2023-01-11 01:53:59 +08:00
group_exitinfo.c Don't include assert.h from public header file 2021-06-03 08:36:03 -07:00
group_find.c sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
group_foreachchild.c Don't include assert.h from public header file 2021-06-03 08:36:03 -07:00
group_free.c sched: Author Gregory Nutt: update licenses to Apache 2021-02-09 01:21:53 -08:00
group_getgid.c Don't include assert.h from public header file 2021-06-03 08:36:03 -07:00
group_getuid.c Don't include assert.h from public header file 2021-06-03 08:36:03 -07:00
group_join.c sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
group_killchildren.c group_kill_children_handler: use nxtask_delete as this is in-kernel 2022-10-19 21:32:30 +08:00
group_leave.c sched/group: fix task info heap-use-after-free 2023-01-11 01:53:59 +08:00
group_malloc.c sched: Author Gregory Nutt: update licenses to Apache 2021-02-09 01:21:53 -08:00
group_realloc.c Fix the initial idle tasks environment 2022-03-16 20:21:19 +08:00
group_setgid.c Don't include assert.h from public header file 2021-06-03 08:36:03 -07:00
group_setuid.c Don't include assert.h from public header file 2021-06-03 08:36:03 -07:00
group_setupidlefiles.c group_setupidlefiles: fall back to /dev/null if /dev/console is disabled 2022-11-09 17:06:38 +08:00
group_setupstreams.c sched/group: Move files_initlist/lib_stream_initialize to group_alloc 2022-03-02 20:29:52 +09:00
group_setuptaskfiles.c sched/group: Move files_initlist/lib_stream_initialize to group_alloc 2022-03-02 20:29:52 +09:00
group_signal.c Fix compiler warnings (-Wunused-parameter) in various functions 2022-07-12 11:42:34 +08:00
group_suspendchildren.c sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
group_waiter.c sched/group: Simplify the allocation and deallocation logic 2022-03-04 12:11:24 +09:00
group_zalloc.c sched: Author Gregory Nutt: update licenses to Apache 2021-02-09 01:21:53 -08:00
group.h libc: Move queue.h from include to include/nuttx 2022-09-26 08:04:58 +02:00
Make.defs sched/Makefile: move task_reparent.c to appropriate Makefile 2022-07-27 23:22:37 +08:00