Live data from Hacker News

Hardening the Kernel in Android Oreo

android-developers.googleblog.com

21–30 of 108 posts

Re: Hardening the Kernel in Android Oreo

#21
Android should really use a modern kernel. All the forking mess involved in Android updates is a terrible problem predicated by the lack of generic drivers on mobile devices.

Copperhead[0] has been working to apply security patches to the kernel for some time and PostMarketOS[1] has an eventual goal of using the mainline upstream kernel. Really pulling for PMOS.

[0]: https://copperhead.co/android/

[1]: https://www.postmarketos.org/

Re: Hardening the Kernel in Android Oreo

#22
post #15

Did they have to license the name?

My understanding was you can use a trademarked name but only if it was in an unrelated category. Clearly no one will confuse a phone running Oreo with a cookie you eat and dip in milk. now if google made a cookie and called it oreo, they would get sued. But IANAL and am probably totally wrong here.

Re: Hardening the Kernel in Android Oreo

#23
post #2

Nice set of features, that the majority of Android users will only get in a few years. Maybe we should start making bets if Android Oreo be able to beat Nougat and be above 13.5% next year this time around.

You probably know this but because of project Treble for future versions after Android Oreo will probably be adopted more quickly. It is unlikely for Oreo to do much better then Nougat then from what I have read.

Which iteration of "project that will definitely reduce Android device fragmentation and ensure that all capable devices will get the new software version as soon as possible" are we on at this point?

Re: Hardening the Kernel in Android Oreo

#24
post #12

Earlier quoted context omitted.

You probably know this but because of project Treble for future versions after Android Oreo will probably be adopted more quickly. It is unlikely for Oreo to do much better then Nougat then from what I have read.

Anyone beliveing that project Treble will change anything should listen to the ADB Podcast about it. http://androidbackstage.blogspot.de/2017/08/episode-75-proje... Key points: 1 - Google will keep on allowing OEMs to customize Android 2 - OEMs will keep being responsible for delivering updates 3 - OEMs are advised to push fixes upstream and provide updates Given that they are just advised, and not required to act ac…

You are dead on. The problem is incentives. There is no technical solution to solve the issue of OEMs not wanting to spend time/resources on updating older phones.

Treble will help out LineageOS, CopperheadOS, and XDA devs. But it won't improve the update cycles for OEMs when their business (ie profit aims) pressures them to limit development resources to new phones.

Re: Hardening the Kernel in Android Oreo

#25
post #17
post #4

"Android 8.0 makes KASLR available in Android kernels 4.4 and newer." And yet on my pixel with Android 8.0, I am only using 3.18.52. Who actually ships Android with kernel 4.x?

I was surprised to read that in the article. New android phones from top vendors (not the $50 junk devices) ship with 3.x kernels? Wow.

3.x kernels with security patches. What seems to be the issue?

You can claim big rewards from Google if you report kernel exploits in Android.

Re: Hardening the Kernel in Android Oreo

#26

Android should really use a modern kernel. All the forking mess involved in Android updates is a terrible problem predicated by the lack of generic drivers on mobile devices. Copperhead[0] has been working to apply security patches to the kernel for some time and PostMarketOS[1] has an eventual goal of using the mainline upstream kernel. Really pulling for PMOS. [0]: https://copperhead.co/android/ [1]: https://www.po…

Yes, this was my first thought as I was reading the article. A better title for it would be "Backporting Modern Linux Kernel Features to Our Really Old Kernels Instead of Doing the Right Thing and Keeping Up To Date".

I do -- I really do -- appreciate that version churn is difficult, and the Linux kernel also doesn't make it easy since they don't guarantee any stable internal APIs, but they're also adding a lot of work on themselves by having to maintain their own kernel trees that diverge significantly from mainline. They're also at the mercy (to some extent) of many chipset manufacturers and whatever they've chosen to base their efforts on.

A quick look at some kernel release timeframes from the versions they mention in the article:

    4.3  - 11/2015
    4.4  - 02/2016
    4.6  - 05/2016
    4.8  - 10/2016
    4.10 - 02/2017
The only kernel out of that list I'd unquestioningly accept as it being unrealistic to upgrade to for Oreo is 4.10. 4.8 might be a stretch since I'm guessing they'd already branched internally for Oreo by then, though they likely had a month or so of RCs that they could have used as a base before that. There's certainly risk to basing your work on a newly-released (or soon-to-be-released) kernel, but given the general high quality of kernel releases, I imagine that'd be pretty far down on their list of risks. Regardless, 4.6 or 4.7 would be entirely reasonable to use as a base, and since they own the conformance test criteria, they could also require that all their vendors use that as a minimum version.

And yet, they are backporting some features as far back as 3.18, which was originally released in December of 2014, and, while it was designated a LTS kernel, it, at this point in time, has moved into end-of-life status. And we wonder why Android security is a nightmare.

Re: Hardening the Kernel in Android Oreo

#27
post #22
post #15

Did they have to license the name?

My understanding was you can use a trademarked name but only if it was in an unrelated category. Clearly no one will confuse a phone running Oreo with a cookie you eat and dip in milk. now if google made a cookie and called it oreo, they would get sued. But IANAL and am probably totally wrong here.

Google extremely obviously did not use the name Oreo without asking for permission

Re: Hardening the Kernel in Android Oreo

#29
post #25
post #17

Earlier quoted context omitted.

I was surprised to read that in the article. New android phones from top vendors (not the $50 junk devices) ship with 3.x kernels? Wow.

3.x kernels with security patches. What seems to be the issue? You can claim big rewards from Google if you report kernel exploits in Android.

> 3.x kernels with security patches. What seems to be the issue?

Limiting the scope of vulnerabilities before they are patched.

There's plenty of more recent defence-in-depth work that will make some vulnerabilities impossible to exploit on more recent kernels, and while they will get patched on the older kernels it'd still be nicer if they weren't exploitable in the first place.

Re: Hardening the Kernel in Android Oreo

#30

Android should really use a modern kernel. All the forking mess involved in Android updates is a terrible problem predicated by the lack of generic drivers on mobile devices. Copperhead[0] has been working to apply security patches to the kernel for some time and PostMarketOS[1] has an eventual goal of using the mainline upstream kernel. Really pulling for PMOS. [0]: https://copperhead.co/android/ [1]: https://www.po…

Agreed, but let's point fingers at the whole stack if we want this to happen.

Treble [0] will finally add a HAL to the base system, so updates to the kernel and drivers should in theory be easier on devices that ship with 8.0 (of which there are exactly zero so far). So at least Google's on the right track.

But Google doesn't create the drivers and Google doesn't ship the board support packages which vendors build upon. And so we come to Qualcomm, Samsung, Mediatek, and whoever else is shipping proprietary drivers for their SoCs and radios, and who don't provide binaries for new ABIs.

The workaround is libhybris, which Ubuntu Touch, Sailfish, and now PMOS are using to support drivers built against Android kernels and its userspace, but that is so fraught with issues that it can't possibly be supported by Google or the vendors.

So we have Android 8.0 shipping with a 4.4 minimum to support the lowest common denominator of BSPs, and it kind of has to be that way until some market force changes the landscape. I don't have high hopes for either of the projects you mentioned, sadly.

[0] https://source.android.com/devices/architecture/treble

Post reply on HN