Is this a critical security issue?
Describe the Bug
I've noticed that on my Ubuntu 26.04 machine the fact processors.extensions is returning "unknown" rather than the expected result;
# facter -p processors.extensions
[
"unknown"
]
Expected Behavior
The fact value should have had the supported extensions returned. e.g.
# facter -p processors.extensions
[
"x86_64",
"x86_64-v1",
"x86_64-v2",
"x86_64-v3"
]
Steps to Reproduce
On a Ubuntu 26.04 machine with openvox/openfact installed. Run in a shell
facter -p processors.extensions
Environment
Version 8.25.0-1+ubuntu26.04
Platform Ubuntu 26.04
Additional Context
Tracing through the code. The extensions value is read via Facter::Resolvers::Uname.resolve(:processor)
https://github.com/OpenVoxProject/openfact/blob/main/lib/facter/resolvers/linux/processors.rb#L38:~:text=extensions
But on OSes like Ubuntu 26.04 the uname installed by default is the https://github.com/uutils/coreutils version. Which returns "unknown" to the uname -p command
which would appear to the the source of the unexpected fact value.
Reading bug reports like https://bugs.launchpad.net/ubuntu/+source/coreutils-from/+bug/2122648
It looks like the uutils/coreutils dev aren't going to implement the uname -p flag, but they recommend uname -m as a replacement.
Which does indeed look like it would return the wanted value for the processors.extensions fact. And the non uutils uname command also seems to return the wanted value via uname -m as well.
So I'd suggest to fix this. That https://github.com/OpenVoxProject/openfact/blob/main/lib/facter/resolvers/linux/processors.rb#L38:~:text=extensions (and potentially any other cases where Facter::Resolvers::Uname.resolve(:processor) is used). Is changed to Facter::Resolvers::Uname.resolve(:machine) Which should correct the fact value on machines where the uutils/coreutils are installed.
Relevant log output
Is this a critical security issue?
Describe the Bug
I've noticed that on my Ubuntu 26.04 machine the fact processors.extensions is returning "unknown" rather than the expected result;
Expected Behavior
The fact value should have had the supported extensions returned. e.g.
Steps to Reproduce
On a Ubuntu 26.04 machine with openvox/openfact installed. Run in a shell
Environment
Version 8.25.0-1+ubuntu26.04
Platform Ubuntu 26.04
Additional Context
Tracing through the code. The extensions value is read via Facter::Resolvers::Uname.resolve(:processor)
https://github.com/OpenVoxProject/openfact/blob/main/lib/facter/resolvers/linux/processors.rb#L38:~:text=extensions
But on OSes like Ubuntu 26.04 the uname installed by default is the https://github.com/uutils/coreutils version. Which returns "unknown" to the uname -p command
# uname -p unknownwhich would appear to the the source of the unexpected fact value.
Reading bug reports like https://bugs.launchpad.net/ubuntu/+source/coreutils-from/+bug/2122648
It looks like the uutils/coreutils dev aren't going to implement the uname -p flag, but they recommend uname -m as a replacement.
# uname -m x86_64Which does indeed look like it would return the wanted value for the processors.extensions fact. And the non uutils uname command also seems to return the wanted value via uname -m as well.
So I'd suggest to fix this. That https://github.com/OpenVoxProject/openfact/blob/main/lib/facter/resolvers/linux/processors.rb#L38:~:text=extensions (and potentially any other cases where
Facter::Resolvers::Uname.resolve(:processor)is used). Is changed toFacter::Resolvers::Uname.resolve(:machine)Which should correct the fact value on machines where the uutils/coreutils are installed.Relevant log output