zephyr/tests/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 boards native_posix: Remove twister support 2025-03-07 19:16:14 +01:00
canbus/isotp
debug debug: Added CPU usage callback 2025-06-25 15:29:06 -10:00
dfu tests: use simulators in integration platforms 2025-03-11 11:35:15 +01:00
display/cfb/basic tests: display: cfb: added tests for draw_circle API 2025-06-26 22:09:48 -05:00
dsp
edac
emul
fs tests: samples: Extend support for nRF54LM20A 2025-06-27 18:26:57 -05:00
input
ipc
jwt test/subsys/jwt: Work around for qemu_rx support 2025-06-26 14:07:03 +02:00
llext llext: add dynamic heap allocation support 2025-06-04 15:50:57 -04:00
logging tests: logging/log_syst: fix unused var warnings 2025-05-29 20:18:34 -04:00
lorawan
mem_mgmt
mgmt mgmt: mcumgr: remove redundant arguments for zephyr_library 2025-06-24 20:11:27 -10:00
modbus modbus: serial: Add non-compliant mode with custom stop-bit settings 2025-06-10 12:53:23 -04:00
modem tests: modem_ubx: Fix clang failure by removing static keyword 2025-05-31 05:56:01 -04:00
openthread net: openthread: Make Radio workqueue priority configurable 2025-06-18 07:40:36 +02:00
pm tests: do not use "sanity" word 2025-06-25 16:00:10 -10:00
portability tests: subsys: Fix zassert string 2025-05-22 16:17:23 +02:00
random/rng
rtio tests: rtio: Add testcase to validate OP_DELAY 2025-04-30 09:48:16 +02:00
sd tests: subsys: sd: Add board overlays to support testcase 2025-04-28 12:56:50 -05:00
secure_storage/psa secure_storage: its: make definitions available outside of transform.h 2025-05-27 15:46:37 +02:00
sensing
settings tests: subsys: Fix zassert string 2025-05-22 16:17:23 +02:00
settings_commit_prio
shell
sip_svc
storage tests/flash_map: Allow custom maps to opt out from some scenarios 2025-05-29 23:26:04 +02:00
testsuite/fff_fake_contexts tests: subsys: Fix zassert string 2025-05-22 16:17:23 +02:00
tracing/tracing_api
usb tests: usb: device_next: rework test configuration 2025-06-27 08:52:22 -10:00
zbus zbus: Fix NULL pointer use in zbus_chan_rm_obs() 2025-07-04 15:49:32 -05:00