diff options
| author | fire855 <thefire855@gmail.com> | 2017-04-08 20:53:44 +0200 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-05-28 17:58:00 +0200 |
| commit | 0744c298230857f7b0b480d5a446d97c33c61a85 (patch) | |
| tree | 0d3474e2f3987f232bad767b79a63755869b0e93 /sound/soc | |
| parent | 85e2cf69caea06a776ad9a44d50e7e33f00be664 (diff) | |
Fix "Elevation of privilege vulnerability in MediaTek components"
CVE-2017-0503
Diffstat (limited to 'sound/soc')
| -rw-r--r-- | sound/soc/mediatek/mt_soc_audio_v3/mt_soc_machine.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/mediatek/mt_soc_audio_v3/mt_soc_machine.c b/sound/soc/mediatek/mt_soc_audio_v3/mt_soc_machine.c index 630366b22..aeefa1abb 100644 --- a/sound/soc/mediatek/mt_soc_audio_v3/mt_soc_machine.c +++ b/sound/soc/mediatek/mt_soc_audio_v3/mt_soc_machine.c @@ -547,6 +547,10 @@ static ssize_t mt_soc_debug_write(struct file *f, const char __user *buf, long unsigned int regvalue = 0; char delim[] = " ,"; memset((void *)InputString, 0, 256); + + if (count > 256) + count = 256; + if (copy_from_user((InputString), buf, count)) { printk("copy_from_user mt_soc_debug_write count = %zu temp = %s\n", count, InputString); @@ -977,5 +981,3 @@ MODULE_DESCRIPTION("ALSA SoC driver "); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:mt-snd-card"); - - |
