Linux Kernel “sound/oss/opl3.c”本地权限提升漏洞

受影响系统:

Linux kernel 2.6.x

描述:
Linux Kernel是开放源码操作系统Linux所使用的内核。

Linux Kernel “sound/oss/opl3.c”在实现上存在本地权限提升漏洞,本地攻击者可利用此漏洞以内核权限执行任意代码,完全控制受影响计算机,造成拒绝服务。

用户可控的声音和通道值索引可造成在其数组外读取和写入,导致内存破坏。

<*来源:Dan Rosenberg (drosenberg@vsecurity.com
  
  链接:
http://marc.info/?l=linux-kernel&m=130089499728386&w=2
*>

测试方法:

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!Dan Rosenberg (drosenberg@vsecurity.com)提供了如下测试方法:


sound/oss/opl3.c |   15 +++++++++++++–
1 files changed, 13 insertions(+), 2 deletions(-)

diff –git a/sound/oss/opl3.c b/sound/oss/opl3.c
index 938c48c..e9d443e 100644
— a/sound/oss/opl3.c
+++ b/sound/oss/opl3.c
@@ -849,6 +849,10 @@ static int opl3_load_patch(int dev, int format, const char __user *addr,

static void opl3_panning(int dev, int voice, int value)
{
+
+    if (voice < 0 || voice >= devc->nr_voice)
+        return;
+
    devc->voc[voice].panning = value;
}

@@ -1066,8 +1070,15 @@ static int opl3_alloc_voice(int dev, int chn, int note, struct voice_alloc_info

static void opl3_setup_voice(int dev, int voice, int chn)
{
–    struct channel_info *info =
–    &synth_devs[dev]->chn_info[chn];
+    struct channel_info *info;
+
+    if (voice < 0 || voice >= devc->nr_voice)
+        return;
+
+    if (chn < 0 || chn > 15)
+        return;
+
+    info = &synth_devs[dev]->chn_info[chn];

    opl3_set_instr(dev, voice, info->pgm_num);

建议:

 

厂商补丁:

Linux
—–
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:

http://www.kernel.org/

发表评论?

0 条评论。

发表评论