Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audio: kpb: fix potential NULL pointer dereference in device list reset #9691

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tmleman
Copy link
Contributor

@tmleman tmleman commented Nov 28, 2024

This patch addresses a potential NULL pointer dereference issue in the devicelist_reset function within the Key Phrase Buffer (KPB) component. The issue was exposed by a recent change in Zephyr's MMU mapping for Intel ADSP ACE30, which now catches NULL pointer accesses.

The devicelist_reset function previously iterated over the entire DEVICE_LIST_SIZE when clearing items and zeroing pointers, which could lead to dereferencing NULL pointers. The fix involves iterating only up to devlist->count to ensure that only valid pointers are accessed.

This change prevents potential NULL pointer dereference and ensures the stability of the KPB component.

This patch addresses a potential NULL pointer dereference issue in the
`devicelist_reset` function within the Key Phrase Buffer (KPB)
component. The issue was exposed by a recent change in Zephyr's MMU
mapping for Intel ADSP ACE30, which now catches NULL pointer accesses.

The `devicelist_reset` function previously iterated over the entire
`DEVICE_LIST_SIZE` when clearing items and zeroing pointers, which could
lead to dereferencing NULL pointers. The fix involves iterating only up
to `devlist->count` to ensure that only valid pointers are accessed.

This change prevents potential NULL pointer dereference and ensures the
stability of the KPB component.

Link: thesofproject#9687

Signed-off-by: Tomasz Leman <[email protected]>
@lgirdwood
Copy link
Member

@tmleman can you check internal CI failure. Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants