5 ms·
The state of the Linux kernel security (2020)
- ClumsyPilot 5y agoObligatory Rust comment: would it help reduce bugs if we replaced loads of janky C code with janky rust code?
- usename_Here 5y agoYes, but good luck getting much effort to happen. Microsoft has said for a few years[1] now that using rust would solve a majority of their kernel sec issues, but they haven't said much since. The work to do that much porting is probably harder and would introduce other bugs then fixing problems as they emerge. [1]https://msrc-blog.microsoft.com/2019/11/07/using-rust-in-windows/ https://msrc-blog.microsoft.com/2019/11/07/using-rust-in-win...
- raxxorrax 5y agoI think security architecture evolved a bit, so a simple rewrite is probably not worth it. Question is if more modern approaches are indeed better. Mobile devices convince me otherwise.
- kaba0 5y ago> Mobile devices convince me otherwise. Why do you think so? We’ve never had such an easily accessible device used by so many people that routinely run untrusted code and is basically full of overly personal information and data. Yet we seldom hear security implications. I’m no security researcher but recently taken a dive into the topic and the state of the art security research is with mobile OSs and iPhones and to a degree android (GrapheneOS itself) does a great job at it.
- raxxorrax 5y agoI measure the result. Mobile devices leak much more data compared to desktop, although that is also due to simple misbehavior of apps and some compromises that we talk about phones.
- seoaeu 5y agoMobile devices are packed with sensors in a way that desktops aren't. And of course it doesn't help that users generally want those sensor measurements to be accessible to the apps they use.
- ClumsyPilot 5y agoWell inacessible sensors are rather useless weight
- kaba0 5y agoPrivacy != security
- raxxorrax 5y agoI disagree. Especially if these privacy violation happen without the explicit knowledge of the user.
- Veserv 5y agoIn 2020 there were 304 publicly disclosed security defects in iOS of which 94 were severe [1] which means an average of 2 severe defects per week and 859 in Android of which 214 were severe which is an average of 4 severe defects per week. These constitute fairly average years (within a factor of 2) so you can reasonably expect that a similar number of defects will be discovered in their currently shipping versions by the end of the year. [1] https://www.cvedetails.com/vulnerability-list.php?vendor_id=49&product_id=15556&version_id=&page=1&hasexp=0&opdos=0&opec=0&opov=0&opcsrf=0&opgpriv=0&opsqli=0&opxss=0&opdirt=0&opmemc=0&ophttprs=0&opbyp=0&opfileinc=0&opginf=0&cvssscoremin=0&cvssscoremax=0&year=2020&month=0&cweid=0&order=3&trc=304&sha=f1112228334f285213ba6575bc7a484d29a781f8 https://www.cvedetails.com/vulnerability-list.php?vendor_id=... [2] https://www.cvedetails.com/vulnerability-list.php?vendor_id=1224&product_id=19997&version_id=&page=5&hasexp=0&opdos=0&opec=0&opov=0&opcsrf=0&opgpriv=0&opsqli=0&opxss=0&opdirt=0&opmemc=0&ophttprs=0&opbyp=0&opfileinc=0&opginf=0&cvssscoremin=0&cvssscoremax=0&year=2020&month=0&cweid=0&order=3&trc=859&sha=8749d8ef5b1dffe9567294e61690771c67a6e7cd https://www.cvedetails.com/vulnerability-list.php?vendor_id=...
- kaba0 5y agoWe would need a reference to compare it against so the data can be meaningful. Also, a patched before disclosure vulnerability is not the same as an actually exploited one. I would really be curious on what do you consider secure that has a similar complexity/attack surface and usage to phone OSs? Apple on the desktop comes close, and Windows does an okayish job, unfortunately Linux (userspace) is terrible security-wise.
- _joel 5y agoThere's definitely a movement to be more open to Rust, but I don't think you'll be seeing it replacing swathes of code anytime soon. Device drivers and such, maybe, but this be a long-tail if at all.
- pcwalton 5y agoYes, but that's of course a long-term, difficult project.
- garethrowlands 5y agoThe stats in that presentation show a large proportion of the bugs being ones that Rust would address. So, yes, in principle.
- candiddevmike 5y agoTowards the middle of the presentation, this seems like an indictment against stable/long term Linux distributions. Maybe Arch's philosophy of always tracking latest limits the attack surface by reducing the overhead of backporting security fixes?
- yakubin 5y agoThe primary reason to use a stable/long term distribution is to avoid updates which break my workflow, not to avoid security holes. For Debian the most visible example of that is that in Debian Stable default repos you only have Firefox ESR, which helps avoid a lot of pain for the user. There are other examples, but nothing breaks my workflow as much as new Firefox releases.
- bayindirh 5y agoMoreover, Debian Stable has a 24H security fix deadline, which voluntarily forces them to fix a lot of security holes pretty quickly. Don't they back port security fixes to stable branch too? I'm a testing user, so I don't follow Stable's package updates very closely.
- 0xC0ncord 5y agoMost bugs that get backported to stable kernels only get backported if they are serious enough or have a CVE assigned to them. Many bugs with potential security implications go unfixed because of this.
- bayindirh 5y agoOh, OK. I learned something important today. Thanks a lot.
- _joel 5y agoYea, it's not just desktop either but having stable releases for server workloads is pretty much essential. If there's no need to update for any required feature in a later version then doing updates for the sake of it just creates churn and actually increases the risk of potential outages. Stable with backported fixes for security means that only updates for security need to be actioned.
- amarshall 5y agoVideo of presentation: https://youtu.be/PGwFyzh2KTA?list=PLVl2hFL_zAh-cAfx6y4k-fODfbHeQzb_O&t=1233 https://youtu.be/PGwFyzh2KTA?list=PLVl2hFL_zAh-cAfx6y4k-fODf...
- _joel 5y agoThanks to Kees and all the people that have worked over at Kernsec. I've been watching on the mailing lists for some time now and it's been really fun to get an insight into the work that's been going on there.