Commit Graph

8 Commits

Author SHA1 Message Date
Changqing Li e73af91ee3 libblockdev: fix CVE-2025-6019
CVE-2025-6019:
A Local Privilege Escalation (LPE) vulnerability was found in
libblockdev. Generally, the "allow_active" setting in Polkit permits a
physically present user to take certain actions based on the session
type. Due to the way libblockdev interacts with the udisks daemon, an
"allow_active" user on a system may be able escalate to full root
privileges on the target host. Normally, udisks mounts user-provided
filesystem images with security flags like nosuid and nodev to prevent
privilege escalation. However, a local attacker can create a specially
crafted XFS image containing a SUID-root shell, then trick udisks into
resizing it. This mounts their malicious filesystem with root
privileges, allowing them to execute their SUID-root shell and gain
complete control of the system.

Refer:
https://cdn2.qualys.com/2025/06/17/suse15-pam-udisks-lpe.txt

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-07-13 14:35:44 -04:00
Hongxu Jia 9bf6b5fe54 libblockdev: Do not include duplicate entries in bd_lvm_lvs output
We use "-o segtypes" for the "lvs" command which means multisegment
LVs will be twice in the output. [1]
...
$ lvs --noheadings --nosuffix --nameprefixes --unquoted --units=b -a -o
vg_name,lv_name,lv_uuid,lv_size,lv_attr,segtype,origin,pool_lv,data_lv,metadata_lv,role,move_pv,data_percent,metadata_percent,copy_percent,lv_tags

OUTPUT:
|LVM2_VG_NAME=rootvg LVM2_LV_NAME=RCSMW-ARM_CXP2020233_2_R20A154
LVM2_LV_UUID=TgjM5V-jhXX-tPTf-gPMa-c3w6-QEjo-7qkmVg
LVM2_LV_SIZE=71303168 LVM2_LV_ATTR=wi-ao--- LVM2_SEGTYPE=linear
LVM2_ORIGIN= LVM2_POOL_LV= LVM2_DATA_LV= LVM2_METADATA_LV=
LVM2_LV_ROLE=public LVM2_MOVE_PV= LVM2_DATA_PERCENT=
LVM2_METADATA_PERCENT= LVM2_COPY_PERCENT= LVM2_LV_TAGS=

|LVM2_VG_NAME=rootvg LVM2_LV_NAME=RCSMW-ARM_CXP2020233_2_R20A154
LVM2_LV_UUID=TgjM5V-jhXX-tPTf-gPMa-c3w6-QEjo-7qkmVg
LVM2_LV_SIZE=71303168 LVM2_LV_ATTR=wi-ao--- LVM2_SEGTYPE=linear
LVM2_ORIGIN= LVM2_POOL_LV= LVM2_DATA_LV= LVM2_METADATA_LV=
LVM2_LV_ROLE=public LVM2_MOVE_PV= LVM2_DATA_PERCENT=
LVM2_METADATA_PERCENT= LVM2_COPY_PERCENT= LVM2_LV_TAGS=
...

See [2]

[1] https://github.com/storaged-project/libblockdev/pull/671
[2] https://github.com/storaged-project/libblockdev/issues/667

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-12-09 08:37:06 -08:00
Hongxu Jia ca016f115d libblockdev: drop obsolete patch
Since libblockdev is upgraded to 2.18, the local patch is obsolete.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-08-15 08:20:06 -07:00
Hongxu Jia 3bea987cde libblockdev: clean up obsolete patches
Since upgrading libblockdev to 2.18, these patches are
useless, remove them.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-08-02 11:23:03 -07:00
Changqing Li b4e6b08e05 libblockdev: 2.16 -> 2.18
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-07-20 16:07:12 -07:00
Andreas Müller a79beac6db libblockdev: update 2.10 -> 2.16
I gave my best to rework patches:

* 0005-fix-a-clang-compiling-issue.patch: This was a bit challenging.
  Because of I do not use clang I cannot test and confirm that no new breakers
  were introduced.
* 0004-fix-compile-failure-against-musl-C-library.patch: Just tested to apply
  properly.

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-08 17:00:06 -07:00
Hongxu Jia 50d0cebed8 libblockdev: fix a clang compiling issue
[snip]
../../../git/src/plugins/fs.c:2617:26: error: missing field 'start'
initializer [-Werror,-Wmissing-field-initializers]
    PedGeometry geom = {0};
                         ^
../../../git/src/plugins/fs.c:2618:30: error: missing field 'start'
initializer [-Werror,-Wmissing-field-initializers]
    PedGeometry new_geom = {0};
[snip]

Fix typo s/enum libvk_packet_format format/enum libvk_secret secret_type/

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-08-13 13:21:02 +02:00
Hongxu Jia 0b4f749179 libblockdev: add recipe 2.10
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-08-13 13:19:41 +02:00