8000 libblkid: Fix crash while parsing config with libeconf by stanislav-brabec · Pull Request #3574 · util-linux/util-linux · GitHub
[go: up one dir, main page]

Skip to content

libblkid: Fix crash while parsing config with libeconf #3574

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 8000 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

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

Conversation

stanislav-brabec
Copy link
Contributor
@stanislav-brabec stanislav-brabec commented May 16, 2025

As the whole econf_file structure is freed by econf_free(file) at the end of blkid_read_config(), econf_file structure cannot be defined as static and initialized only once. The econf_free() is not robust enough and keeps a pointer to the garbage after the first call of blkid_read_config(). And if /etc/blkid.conf does not exist, it is called second time.

Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1242705

As the whole econf_file structure is freed by econf_free(file) at the end
of blkid_read_config(), econf_file structure cannot be defined as static
and initialized only once. The econf_free() is not robust enough and keeps
a pointer to the garbage after the first call of blkid_read_config(). And
if /etc/blkid.conf does not exist, it is called second time.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Cc: Stefan Schubert <schubi@suse.de>
Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1242705
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.

1 participant
0