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

avoid possible OOB read in bootchooser backends #1418

Merged
merged 2 commits into from
May 14, 2024

Conversation

jluebbe
Copy link
Member

@jluebbe jluebbe commented May 13, 2024

When using g_subprocess_communicate, we often need to process the stdout as a null-terminated string (instead of a GBytes). While there is g_subprocess_communicate_utf8, we can't be sure that the output is actually valid UTF-8, so we need our own helper.

While we've not seen any issues with this in CI or in the field, it's better do be careful.

When using g_subprocess_communicate, we often need to process the stdout
as a null-terminated string (instead of a GBytes). While there is
g_subprocess_communicate_utf8, we can't be sure that the output is
actually valid UTF-8, so we need our own helper.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
…f-bound reads

For clarity, use the names variable names stdout_bytes and stdout_str
consistently.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
@jluebbe jluebbe requested a review from ejoerns May 13, 2024 14:02
@jluebbe jluebbe self-assigned this May 13, 2024
@jluebbe jluebbe added this to the Release v1.12 milestone May 13, 2024
@jluebbe jluebbe assigned ejoerns and unassigned jluebbe May 13, 2024
@jluebbe jluebbe merged commit 9deacf1 into rauc:master May 14, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants