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

Insecure manual to install albert on Open Build Service #1326

Closed
graue70 opened this issue Nov 5, 2023 · 9 comments
Closed

Insecure manual to install albert on Open Build Service #1326

graue70 opened this issue Nov 5, 2023 · 9 comments
Assignees

Comments

@graue70
Copy link

graue70 commented Nov 5, 2023

On https://software.opensuse.org/download.html?project=home:manuelschneid3r&package=albert, there is a manual on how to install albert. For example, for 22.04, it contains these lines:

echo 'deb http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_22.04/ /' | sudo tee /etc/apt/sources.list.d/home:manuelschneid3r.list
curl -fsSL https://download.opensuse.org/repositories/home:manuelschneid3r/xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_manuelschneid3r.gpg > /dev/null
sudo apt update
sudo apt install albert

As explained in detail in https://askubuntu.com/a/1307181 (the question is a different one, but the answer still explains the problem), these commands are insecure and not recommended.

This is a suggestion on how to improve them:

wget -qO- https://download.opensuse.org/repositories/home:manuelschneid3r/xUbuntu_22.04/Release.key | gpg --dearmor > manuelschneid3r-albert-keyring.gpg
cat manuelschneid3r-albert-keyring.gpg | sudo tee /usr/share/keyrings/manuelschneid3r-albert-keyring.gpg > /dev/null
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/manuelschneid3r-albert-keyring.gpg] http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_22.04/ /' | sudo tee /etc/apt/sources.list.d/home:manuelschneid3r.list
sudo apt update && sudo apt install albert

(The commands can probably be improved further, e.g. by using gpg -o /usr/share/keyrings/manuelschneid3r-albert-keyring.gpg which prevents writing the file to a temporary location.)

@ManuelSchneid3r
Copy link
Member

ManuelSchneid3r commented Nov 6, 2023

First note that this is out of scope here. The distribution is handled by open build service. I. Can't change it. You have to discuss these kind of things in their irc channel.

The suggestion in this article does not make much sense in my eyes. Keys have to be trusted. If you have one malicious repo key in there you are done. If these are good they won't "cross sign". Technically I think there not much you have to worry about, because even if you are a trusted repository, why would you add your package to another server (I doubt that this is an easy task)? You have your own trusted repository right?

I the end this idea is ineffective, as the article states,

because packages currently can run arbitrary shell code as root in their setup scripts

@ManuelSchneid3r
Copy link
Member

Please correct me if I am wrong

@graue70
Copy link
Author

graue70 commented Dec 6, 2023

I agree with you that it is a small attack vector, but still (one sentence after the one you quoted):

Closing off one attack vector doesn't hurt, though, and progress is (slowly) being made on other fronts.

Also, Signal probably has some knowledgeable security experts and they promote this method, too: https://signal.org/download/linux/

@ManuelSchneid3r
Copy link
Member

Yeah I agree it won't hurt. I am not in the position to change anything at OBS. Sure we could have dedicated install scripts. But then these would have to be maintained. Imho it's not worth the hassle. If you manage to convince devs at open suse several thousands of project would benefit the change. I think it is rather worth the effort discussing this topic in their irc channel.

@graue70
Copy link
Author

graue70 commented Dec 7, 2023

grafik
That page lists only you on the 'users' tab.

I guess I won't pursue this any further.

@ManuelSchneid3r
Copy link
Member

Malcom Lewis may be just a regular user. If you post just a github link there even employees may give you that kind of answers. I bet he did not even read the issue.

@ManuelSchneid3r
Copy link
Member

@graue70
Copy link
Author

graue70 commented Dec 8, 2023

No I have not seen another comment.

Nice! Now I found this: openSUSE/software-o-o#1189

@ManuelSchneid3r
Copy link
Member

There you go. Good luck! Subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants