[Bug 2037338] Re: logic error in snap_validate: kern_major_min: unbound variable
Launchpad Bug Tracker
2037338 at bugs.launchpad.net
Mon Sep 25 23:38:21 UTC 2023
** Merge proposal linked:
https://code.launchpad.net/~simpoir/livecd-rootfs/+git/livecd-rootfs/+merge/452040
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to livecd-rootfs in Ubuntu.
https://bugs.launchpad.net/bugs/2037338
Title:
error in snap_validate_seed: kern_major_min: unbound variable
Status in livecd-rootfs package in Ubuntu:
New
Bug description:
[ Impact ]
* Livecd-rootfs live-builds will fail for images where
snap_validate_seed is called in hooks where a kernel is not present.
* It's very low impact, as snap seeding needs a kernel to properly
set apparmor features, but there is nonetheless a logic bug in the
variable scope, leading to an error if a binary hook uses `set -u`
[ Test Plan ]
* Running a livebuild against an image target calling
snap_validate_seed with no kernel would surface the error (e.g.
https://pastebin.ubuntu.com/p/Hwn3wMbGtS/)
[ Where problems could occur ]
* The code is mostly the same, but hoisting the declaration to the
function top instead of inside branch.
* a needless call to umount/mount the generic overlay might happen if
the other conditional branch erroneously triggers.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2037338/+subscriptions
More information about the foundations-bugs
mailing list