Virtual ALSA Driver Posted To Help With Linux Testing/Fuzzing
Ivan Orlov this past week posted the patches for VALSA, the Virtual ALSA sound driver that aims to help Linux kernel developers in testing and fuzzing of the sound subsystem.
The Virtual ALSA driver covers all possible use-cases including scenarios like errors and delay injection, support for random and pattern-based data generation, and more. While the Linux kernel has some virtual media drivers, so far there hasn't been a Virtual ALSA driver besides the snd-dummy module.
Ivan explained with the VALSA code:
The VALSA driver code is just around 600 new lines while there is additionally some documentation too.
More details on the Linux Virtual ALSA driver via this kernel patch series.
The Virtual ALSA driver covers all possible use-cases including scenarios like errors and delay injection, support for random and pattern-based data generation, and more. While the Linux kernel has some virtual media drivers, so far there hasn't been a Virtual ALSA driver besides the snd-dummy module.
Ivan explained with the VALSA code:
"This new Virtual ALSA Driver has several features which can be useful during the userspace ALSA applications testing/fuzzing, or testing/fuzzing of the PCM middle layer. Not all of them can be implemented using the existing virtual drivers (like dummy or loopback). Here is what can this driver do:
- Simulate both capture and playback processes
- Check the playback stream for containing the looped pattern
- Generate random or pattern-based capture data
- Inject delays into the playback and capturing processes
- Inject errors during the PCM callbacks
Also, this driver can check the playback stream for containing the predefined pattern, which is used in the corresponding selftest to check the PCM middle layer data transferring functionality. Additionally, this driver redefines the default RESET ioctl, and the selftest covers this PCM API functionality as well."
The VALSA driver code is just around 600 new lines while there is additionally some documentation too.
More details on the Linux Virtual ALSA driver via this kernel patch series.
2 Comments