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

ipc4: handler: ipc4_get_large_config_module_instance: Fixed handling of memory allocation error #5699

Merged
merged 1 commit into from
Apr 25, 2022

Conversation

softwarecki
Copy link
Collaborator

This PR fixes handling of memory allocation error in ipc4_get_large_config_module_instance function. The value returned by the rballoc function is stored in the global variable msg_reply.tx_data. If an allocation error occurs, the function returns an error, but tx_data is overwritten with null. This value is then used in the ipc_msg_send function which leads to null pointer reference.

@sys-pt1s
Copy link

Can one of the admins verify this patch?

@softwarecki softwarecki force-pushed the GetLargeConfig-fix branch 2 times, most recently from 757e395 to f125368 Compare April 20, 2022 07:24
@lgirdwood
Copy link
Member

@tmleman @RanderWang any comments ?

…of memory allocation error

The value returned by the rballoc function is stored in the global variable
msg_reply.tx_data. If an allocation error occurs, the function returns an
error, but tx_data is overwritten with null. This value is then used in the
ipc_msg_send function which leads to null pointer reference.

Signed-off-by: Adrian Warecki <[email protected]>
@lgirdwood lgirdwood merged commit b8b84e2 into thesofproject:main Apr 25, 2022
@softwarecki softwarecki deleted the GetLargeConfig-fix branch March 8, 2023 08:42
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.

5 participants