nuttx/sched
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
..
clock clock: adjust clock function to support tick 2022-11-01 21:54:20 +08:00
environ sched/env: Don't need copy env variable from parent in env_dup 2022-10-19 08:22:56 +09:00
group sched/group: fix task info heap-use-after-free 2023-01-11 01:53:59 +08:00
init sched/nx_bringup: Set the initial stack size in kernel build as well 2022-12-09 22:15:48 +08:00
irq sched/irq: add spin_unlock_irqsave/irqrestore_wo_note 2023-01-02 22:29:01 +08:00
misc assert:add a last type to call notifier 2023-01-05 22:58:00 +08:00
module nuttx: unify MIN, MAX and ABS macro definition across the code 2022-12-21 09:31:28 +08:00
mqueue nuttx/sched: merge up_block_task and up_unblock_task 2022-11-22 22:59:08 +08:00
paging nuttx/sched: merge up_block_task and up_unblock_task 2022-11-22 22:59:08 +08:00
pthread libc/stdio: Flush streams in userspace when process exits 2022-12-22 20:16:11 +08:00
sched drivers/note: Replace the scritical section with spin_xxx_wo_note 2023-01-04 00:21:18 +02:00
semaphore sched/semaphore: check sem flags before enable priority inheritance 2022-12-20 11:50:42 +08:00
signal signal: Support sigaction:sa_user, siginfo_t:si_user with user info 2022-12-28 23:05:58 +08:00
task libc/stdio: Flush streams in userspace when process exits 2022-12-22 20:16:11 +08:00
timer sched/posix/timer: handle invaild timerid correctly 2022-10-31 19:59:29 -03:00
tls sched/group: fix task info heap-use-after-free 2023-01-11 01:53:59 +08:00
wdog libc: Move queue.h from include to include/nuttx 2022-09-26 08:04:58 +02:00
wqueue sched: remove unnecessary type cast 2022-12-15 09:44:32 +08:00
Kconfig sched: move SCHED_INSTRUMENTATION_xxx to note Kconfig 2022-12-30 15:50:30 -03:00
Makefile Move _assert to kernel space. 2022-12-06 18:33:21 +08:00