diff options
| author | fire855 <thefire855@gmail.com> | 2017-04-08 22:48:19 +0200 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-11-20 18:13:36 +0100 |
| commit | 8cc8f168bd54dee8851eea249280e90605420d72 (patch) | |
| tree | 4ec66f3b0dbdc073c27e89fe0bd3d8ab0b12664b /sound/soc | |
| parent | ed1af43585737bccf950d2ef80ed1b7ac149064b (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_v2/mt_soc_machine.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/mediatek/mt_soc_audio_v2/mt_soc_machine.c b/sound/soc/mediatek/mt_soc_audio_v2/mt_soc_machine.c index ca5255abd..967e9cdc0 100644 --- a/sound/soc/mediatek/mt_soc_audio_v2/mt_soc_machine.c +++ b/sound/soc/mediatek/mt_soc_audio_v2/mt_soc_machine.c @@ -551,6 +551,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); @@ -970,5 +974,3 @@ MODULE_DESCRIPTION("ALSA SoC driver "); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:mt-snd-card"); - - |
