zephyr/subsys
Jan Tore Guggedal a7ce6055b7 zbus: Fix NULL pointer use in zbus_chan_rm_obs()
Fix a bug in zbus_chan_rm_obs() where removing the first observer in a
channel's observer list would cause undefined behavior due to accessing
a member of a NULL pointer.

The issue occurred when prev_obs_nd was NULL (indicating the first node
in the list) and the code attempted to pass &prev_obs_nd->node to
sys_slist_remove(). This resulted in accessing the 'node' member of a
NULL pointer, which is undefined behavior even when taking its address.

The sys_slist_remove() function is designed to handle a NULL prev_node
parameter correctly for removing the first element in a list. The fix
ensures we pass NULL directly instead of attempting to compute the
address of a member within a NULL pointer.

This was detected by Undefined Behavior Sanitizer as "member access
within null pointer".

Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
2025-07-04 15:49:32 -05:00
..
bindesc bindesc: fix typo in errno (ENONET->ENOENT) 2025-06-20 13:21:39 -04:00
bluetooth bluetooth: smp: add todo comments for ctkd 2025-07-04 13:10:21 -05:00
canbus kconfig: fix typo in (soc, subsys) 2025-07-01 10:58:54 -10:00
console
dap
debug kconfig: fix typo in (soc, subsys) 2025-07-01 10:58:54 -10:00
demand_paging
dfu
disk
dsp
emul
fb cfb: added API for drawing a circle 2025-06-26 22:09:48 -05:00
fs fs/ext2: Missing error check in ext2_inode_remove_blocks 2025-06-17 16:06:21 +02:00
input input: Fix function signature of input_thread 2025-06-18 07:41:25 +02:00
ipc kconfig: fix typo in (soc, subsys) 2025-07-01 10:58:54 -10:00
jwt modules: mbedtls: make key exchange Kconfigs depend on, not select 2025-05-13 22:22:43 -04:00
llext llext: adopt SHELL_HELP macro 2025-06-21 18:34:08 +02:00
logging kconfig: fix typo in (soc, subsys) 2025-07-01 10:58:54 -10:00
lorawan
mem_mgmt
mgmt net: Fix alignment error with net_ipaddr_copy() 2025-07-04 13:16:32 -05:00
modbus modbus: fix Apache-2.0 SPDX License identifier case 2025-06-11 10:23:46 -07:00
modem ubx: Refactor codebase in order to improve usability 2025-05-30 19:40:19 +02:00
net net: lib: coap: fix potential null pointer 2025-07-04 15:48:40 -05:00
pm pm: fix typo in KConfig 2025-07-04 13:05:56 -05:00
pmci pmci: mctp: Fix No SOURCES CMake warning 2025-04-23 17:55:19 +02:00
portability subsys/portability/cmsis_rtos_v2: Fix code compliance issues 2025-05-21 12:35:28 +02:00
profiling
random
retention
rtio rtio: Introduce OP_DELAY as a valid SQE operation 2025-04-30 09:48:16 +02:00
sd sd: fix incorrect error logging 2025-06-05 15:02:15 -05:00
secure_storage secure_storage: its: transform: improve expandability 2025-05-27 15:46:37 +02:00
sensing
settings settings: zms: fix out-of-bounds null terminator write 2025-06-26 11:12:49 +02:00
shell net: mgmt: Convert the mgmt API to use 64-bit masks 2025-06-18 10:54:44 +02:00
sip_svc
stats
storage storage: flash_map: Add support for sub-partitions 2025-06-11 10:13:56 -07:00
task_wdt
testsuite ztest: native_sim: fail instead of crashing on wrong arguments 2025-07-01 10:16:54 -05:00
timing
tracing tracing: Allow disabling idle traces 2025-06-27 08:59:32 -10:00
usb usb: device_next: uac2: support higher bInterval values 2025-06-27 09:02:29 -10:00
zbus zbus: Fix NULL pointer use in zbus_chan_rm_obs() 2025-07-04 15:49:32 -05:00
CMakeLists.txt
Kconfig