ubusd: Fix out of bounds access in event register message
authorHauke Mehrtens <[email protected]>
Mon, 13 Oct 2025 21:59:33 +0000 (23:59 +0200)
committerFelix Fietkau <[email protected]>
Tue, 14 Oct 2025 10:15:17 +0000 (12:15 +0200)
commitd31effb4277bd557f5ccf16d909422718c1e49d0
tree8ca54b8bf97f899f0fbff0cf544c6cdd149a344f
parent83a70399030dd6e97b650b11ba570b6c896feb6d
ubusd: Fix out of bounds access in event register message

The code assumes that the provided pattern is at least one byte long.
reject shorter patterns.

Empty messages could lead to heap corruptions and ubusd_acl_check()
bypass.

Reported-by: Karsten Sperling <[email protected]>
Fixes: 12623b43060a ("trim the wildcard of partial patterns to keep the avl tree sorted properly")
Signed-off-by: Hauke Mehrtens <[email protected]>
ubusd_event.c