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

[Needs testing] gnome-rr.c: Migrate from g_memdup() go g_memdup2() #209

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

Conversation

ItzSwirlz
Copy link
Contributor

@ItzSwirlz ItzSwirlz commented Jun 21, 2022

Virtually no difference between the functions except for
byte_size becoming a gsize.

This is a measure to mitigate integer overflows.

See:
https://docs.gtk.org/glib/func.memdup2.html
https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538


I still need to test this, don't accept yet

Virtually no difference between the functions except for
byte_size becoming a gsize.

This is a measure to mitigate integer overflows.

See:
https://docs.gtk.org/glib/func.memdup2.html
https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538
@ItzSwirlz ItzSwirlz marked this pull request as draft June 21, 2022 01:42
@Fantu
Copy link
Contributor

Fantu commented Jun 21, 2022

this need also dump version of libglib2.0-dev in d/control: libglib2.0-dev (>= 2.68)
but I suppose this change will be accepted only after lmde6 because bullseye have 2.66.8
there was a security issue related to g_memdup (CVE 2021-27219), have it solved but not don't have g_memdup2 in symbols so seems this function was not backported in older version

@ItzSwirlz
Copy link
Contributor Author

Yeah. That's why LMDE is failing. We can do a version check (for a few lines is pointless) or backport libglib. Personally I would leave this aside and, @Fantu should we put this patch in Debian?

@Fantu
Copy link
Contributor

Fantu commented Jun 21, 2022

the security issue (https://security-tracker.debian.org/tracker/CVE-2021-27219) is already solved in debian so is not urgent apply this FWIK and we can wait do be applied upstream first
remember to add the missed glib version dump in d/control and meson.build in this PR

edit:
from note I saw:
Fix backport in 2.66.7 adds 'g_memdup2' for internal use but does not allow fixing reverse-dependencies using vulnerable 'g_memdup'
so seems that glib security fix solved only internal use, I did another fast search but I not understand how is urgent replace it in software using g_memdup
complete the patch and probably we will apply it to the next 5.4 build for debian experimental

about other components cjs resolved it in latest rebase, muffin big rebase was on older version from Focal and still use g_memdup, mutter replaced it 1 year ago https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1708
other components need to be checked

@clefebvre clefebvre changed the title [Needs testing] gnome-rr.c: Migrate from g_memdup() go g_memdup2() [Next] [Needs testing] gnome-rr.c: Migrate from g_memdup() go g_memdup2() Nov 17, 2022
@clefebvre clefebvre marked this pull request as ready for review November 19, 2023 12:50
@clefebvre clefebvre changed the title [Next] [Needs testing] gnome-rr.c: Migrate from g_memdup() go g_memdup2() [Needs testing] gnome-rr.c: Migrate from g_memdup() go g_memdup2() Nov 19, 2023
@clefebvre
Copy link
Member

Hi,

We no longer need to support LMDE 5.

On our side it's OK to depend on libglib2.0-dev (>= 2.68).

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.

3 participants