-
Notifications
You must be signed in to change notification settings - Fork 1.3k
libblkid: use unsigned long long in struct blkid_struct_topology #2430
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
Conversation
Since util-linux@3ab9e69 topology_set_value() is taking a unsigned long long value, but writing it into a struct with unsigned long fields. On 32 bit systems this results in corrupting the structure, as the two types are 8 and 4 bytes respectively. Signed-off-by: Alexander Kanavin <[email protected]>
Reported-by: util-linux#2430 References: util-linux@3ab9e69 Signed-off-by: Karel Zak <[email protected]>
|
Hmm... nice bug. I'm unsure if using 64-bit numbers everywhere is a good solution if the library API returns these numbers as "unsigned long" in many cases. It would be better to have topology_set_value64() and topology_set_value() to work wilt proper types from the beginning. Alternative bugfix: #2435 ;-) |
|
I'd also say it would be better to avoid using memcpy() so that compilers can do type checks, but I'm not sure if the code can be reworked easily that way. Thanks for the fix. |
|
Yes, memcpy() is pretty aggressive there, but it allows us to use one function for an arbitrary struct member by offsetoff(). |
|
Closing, fixed by #2435 |
Reported-by: util-linux#2430 References: util-linux@3ab9e69 Signed-off-by: Karel Zak <[email protected]>
A number of items are removed because the issues have already been resolved with recipe patches (in separate commits). Some issues were also resolved via upstream version updates: glib-2.0 update to 2.78.0 that includes: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3547 https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3550 curl update to 8.3.0 that includes curl/curl#11610 util-linux update to 2.39 that includes util-linux/util-linux#2430 util-linux/util-linux@3ab9e69 util-linux/util-linux#2435 glib-networking update to 2.78.0 that includes https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/241 python3-cryptography update to 42.0.0 which resolves pyca/cryptography#9370 via pyca/cryptography#9964 perl update to 5.40.0 which resolves Perl/perl5#21379 Signed-off-by: Alexander Kanavin <[email protected]>
A number of items are removed because the issues have already been resolved with recipe patches (in separate commits). Some issues were also resolved via upstream version updates: glib-2.0 update to 2.78.0 that includes: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3547 https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3550 curl update to 8.3.0 that includes curl/curl#11610 util-linux update to 2.39 that includes util-linux/util-linux#2430 util-linux/util-linux@3ab9e69 util-linux/util-linux#2435 glib-networking update to 2.78.0 that includes https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/241 python3-cryptography update to 42.0.0 which resolves pyca/cryptography#9370 via pyca/cryptography#9964 perl update to 5.40.0 which resolves Perl/perl5#21379 Signed-off-by: Alexander Kanavin <[email protected]>
A number of items are removed because the issues have been resolved with recipe patches (in separate commits). Some issues were also resolved via upstream version updates: glib-2.0 update to 2.78.0 that includes: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3547 https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3550 curl update to 8.3.0 that includes curl/curl#11610 util-linux update to 2.39 that includes util-linux/util-linux#2430 util-linux/util-linux@3ab9e69 util-linux/util-linux#2435 glib-networking update to 2.78.0 that includes https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/241 python3-cryptography update to 42.0.0 which resolves pyca/cryptography#9370 via pyca/cryptography#9964 perl update to 5.40.0 which includes Perl/perl5#21379 python3 update to 3.13.0 which includes python/cpython#118425 tcl update to 9.0.0 which includes tcltk/tcl@4ca6172 (tcl8 recipe has a simple backport of this) Signed-off-by: Alexander Kanavin <[email protected]>
A number of items are removed because the issues have been resolved with recipe patches (in separate commits). Some issues were also resolved via upstream version updates: glib-2.0 update to 2.78.0 that includes: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3547 https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3550 curl update to 8.3.0 that includes curl/curl#11610 util-linux update to 2.39 that includes util-linux/util-linux#2430 util-linux/util-linux@3ab9e69 util-linux/util-linux#2435 glib-networking update to 2.78.0 that includes https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/241 python3-cryptography update to 42.0.0 which resolves pyca/cryptography#9370 via pyca/cryptography#9964 perl update to 5.40.0 which includes Perl/perl5#21379 python3 update to 3.13.0 which includes python/cpython#118425 python3 update to 3.13.1 which includes python/cpython#124972 tcl update to 9.0.0 which includes tcltk/tcl@4ca6172 (tcl8 recipe has a simple backport of this) dbus update to 1.16.0 which includes https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/444 https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/289 Signed-off-by: Alexander Kanavin <[email protected]>
A number of items are removed because the issues have been resolved with recipe patches (in separate commits). Some issues were also resolved via upstream version updates: glib-2.0 update to 2.78.0 that includes: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3547 https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3550 curl update to 8.3.0 that includes curl/curl#11610 util-linux update to 2.39 that includes util-linux/util-linux#2430 util-linux/util-linux@3ab9e69 util-linux/util-linux#2435 glib-networking update to 2.78.0 that includes https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/241 python3-cryptography update to 42.0.0 which resolves pyca/cryptography#9370 via pyca/cryptography#9964 perl update to 5.40.0 which includes Perl/perl5#21379 python3 update to 3.13.0 which includes python/cpython#118425 python3 update to 3.13.1 which includes python/cpython#124972 tcl update to 9.0.0 which includes tcltk/tcl@4ca6172 (tcl8 recipe has a simple backport of this) dbus update to 1.16.0 which includes https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/444 https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/289 Signed-off-by: Alexander Kanavin <[email protected]>
A number of items are removed because the issues have been resolved with recipe patches (in separate commits). Some issues were resolved via upstream version updates that bring in needed fixes: glib-2.0 update to 2.78.0 that includes: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3547 https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3550 curl update to 8.3.0 that includes curl/curl#11610 util-linux update to 2.39 that includes util-linux/util-linux#2430 util-linux/util-linux@3ab9e69 util-linux/util-linux#2435 glib-networking update to 2.78.0 that includes https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/241 python3-cryptography update to 42.0.0 which resolves pyca/cryptography#9370 via pyca/cryptography#9964 perl update to 5.40.0 which includes Perl/perl5#21379 python3 update to 3.13.0 which includes python/cpython#118425 python3 update to 3.13.1 which includes python/cpython#124972 tcl update to 9.0.0 which includes tcltk/tcl@4ca6172 (tcl8 recipe has a simple backport of this) dbus update to 1.16.0 which includes https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/444 https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/289 openssh update to 10.0p1 which includes openssh/openssh-portable#425 https://bugzilla.mindrot.org/show_bug.cgi?id=3684 https://marc.info/?l=openbsd-bugs&m=172561736524815&w=2 https://lists.mindrot.org/pipermail/openssh-unix-dev/2024-October/041621.html (all reporting the same issue) gcc update to 15.1 which includes llvm/llvm-project#99699 via gcc-mirror/gcc@fa32100 and allows dropping special flags and exceptions for gcc-sanitizers. Signed-off-by: Alexander Kanavin <[email protected]>
Since 3ab9e69 topology_set_value() is taking a unsigned long long value, but writing it into a struct with unsigned long fields. On 32 bit systems this results in corrupting the structure, as the two types are 8 and 4 bytes respectively.