Skip to contentSkip to conversation

what's the kernel policy WRT firmware parsing security?

alsa-devel Guennadi Liakhovetski 2 participants 3 messages Oct 6, 2019 – Oct 7, 2019

lore
Share & tools
lore
#0 lore raw

Hi,

I decided to have a look at whether the ALSA topology parsing is bullet proof against malformed topology files. It seems not quite to be the case. At least I seem to have found a possibility of crashing the kernel by a malformed topology file. I haven't tested it, so, maybe I'm wrong.

In principle, firmware files can only be written by root, and if you have root access to the system, it's anyway doomed. Is this the approach and we aren't really trying to make topology parsing 100% safe, or do we want to fix any such possible parsing issues?

Thanks
Guennadi
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#1 lore raw

Dne 06. 10. 19 v 12:47 Guennadi Liakhovetski napsal(a):

Quoted 11 lines

Hi,

I decided to have a look at whether the ALSA topology parsing is bullet proof against malformed topology files. It seems not quite to be the case. At least I seem to have found a possibility of crashing the kernel by a malformed topology file. I haven't tested it, so, maybe I'm wrong.

In principle, firmware files can only be written by root, and if you have root access to the system, it's anyway doomed. Is this the approach and we aren't really trying to make topology parsing 100% safe, or do we want to fix any such possible parsing issues?

The kernel should not crash. Dot. If you found a serious issue, please, report it or better, send the fix.

Thanks,
Jaroslav

Signature · 6 lines
Jaroslav Kysela <[email protected]>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#2 lore raw

Hi Jaroslav,

Quoted 8 lines · Jaroslav Kysela

Dne 06. 10. 19 v 12:47 Guennadi Liakhovetski napsal(a):

Quoted 7 lines

Hi,

I decided to have a look at whether the ALSA topology parsing is bullet proof against malformed topology files. It seems not quite to be the case. At least I seem to have found a possibility of crashing the kernel by a malformed topology file. I haven't tested it, so, maybe I'm wrong.

Quoted 7 lines
Quoted 4 lines

In principle, firmware files can only be written by root, and if you have root access to the system, it's anyway doomed. Is this the approach and we aren't really trying to make topology parsing 100% safe, or do we want to fix any such possible parsing issues?

The kernel should not crash. Dot. If you found a serious issue, please, report it or better, send the fix.

Sorry, I'm still configuring / getting used to mutt and git send-mail on this PC, so adding you to CC didn't work out :-/ Here's a link:
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-October/156352.html

Thanks
Guennadi

Quoted 6 lines

Thanks,
Jaroslav

Signature · 2 lines
Jaroslav Kysela <[email protected]>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel