• 公告ID (KylinSec-SA-2024-1501)

摘要:

kernel security update

安全等级: High

公告ID: KylinSec-SA-2024-1501

发布日期: 2024年5月11日

关联CVE: CVE-2021-47211   CVE-2024-26752   CVE-2021-47182  

  • 详细介绍

1. 漏洞描述

   

The Linux Kernel, the operating system core itself.

Security Fix(es):

In the Linux kernel, the following vulnerability has been resolved:

scsi: core: Fix scsi_mode_sense() buffer length handling

Several problems exist with scsi_mode_sense() buffer length handling:

1) The allocation length field of the MODE SENSE(10) command is 16-bits,
occupying bytes 7 and 8 of the CDB. With this command, access to mode
pages larger than 255 bytes is thus possible. However, the CDB
allocation length field is set by assigning len to byte 8 only, thus
truncating buffer length larger than 255.

2) If scsi_mode_sense() is called with len smaller than 8 with
sdev->use_10_for_ms set, or smaller than 4 otherwise, the buffer length
is increased to 8 and 4 respectively, and the buffer is zero filled
with these increased values, thus corrupting the memory following the
buffer.

Fix these 2 problems by using put_unaligned_be16() to set the allocation
length field of MODE SENSE(10) CDB and by returning an error when len is
too small.

Furthermore, if len is larger than 255B, always try MODE SENSE(10) first,
even if the device driver did not set sdev->use_10_for_ms. In case of
invalid opcode error for MODE SENSE(10), access to mode pages larger than
255 bytes are not retried using MODE SENSE(6). To avoid buffer length
overflows for the MODE_SENSE(10) case, check that len is smaller than 65535
bytes.

While at it, also fix the folowing:

* Use get_unaligned_be16() to retrieve the mode data length and block
descriptor length fields of the mode sense reply header instead of using
an open coded calculation.

* Fix the kdoc dbd argument explanation: the DBD bit stands for Disable
Block Descriptor, which is the opposite of what the dbd argument
description was.(CVE-2021-47182)

In the Linux kernel, the following vulnerability has been resolved:

ALSA: usb-audio: fix null pointer dereference on pointer cs_desc

The pointer cs_desc return from snd_usb_find_clock_source could
be null, so there is a potential null pointer dereference issue.
Fix this by adding a null check before dereference.(CVE-2021-47211)

In the Linux kernel, the following vulnerability has been resolved:

l2tp: pass correct message length to ip6_append_data

l2tp_ip6_sendmsg needs to avoid accounting for the transport header
twice when splicing more data into an already partially-occupied skbuff.

To manage this, we check whether the skbuff contains data using
skb_queue_empty when deciding how much data to append using
ip6_append_data.

However, the code which performed the calculation was incorrect:

ulen = len + skb_queue_empty(&sk->sk_write_queue) ? transhdrlen : 0;

...due to C operator precedence, this ends up setting ulen to
transhdrlen for messages with a non-zero length, which results in
corrupted packets on the wire.

Add parentheses to correct the calculation in line with the original
intent.(CVE-2024-26752)

2. 影响范围

cve名称 产品 组件 是否受影响
CVE-2021-47211 KY3.5.2 kernel Fixed
CVE-2024-26752 KY3.5.2 kernel Fixed
CVE-2021-47182 KY3.5.2 kernel Fixed

3. 影响组件

    kernel

4. 修复版本

   

KY3.5.2

软件名称 架构 版本号
kernel-tools-devel x86_64 5.10.0-153.12.0.92.kb8.ky3_5
perf x86_64 5.10.0-153.12.0.92.kb8.ky3_5
kernel-devel x86_64 5.10.0-153.12.0.92.kb8.ky3_5
kernel-tools x86_64 5.10.0-153.12.0.92.kb8.ky3_5
kernel x86_64 5.10.0-153.12.0.92.kb8.ky3_5
kernel-source x86_64 5.10.0-153.12.0.92.kb8.ky3_5
python3-perf x86_64 5.10.0-153.12.0.92.kb8.ky3_5
kernel-headers x86_64 5.10.0-153.12.0.92.kb8.ky3_5
perf aarch64 5.10.0-153.12.0.92.kb8.ky3_5
kernel-tools aarch64 5.10.0-153.12.0.92.kb8.ky3_5
kernel aarch64 5.10.0-153.12.0.92.kb8.ky3_5
kernel-source aarch64 5.10.0-153.12.0.92.kb8.ky3_5
kernel-devel aarch64 5.10.0-153.12.0.92.kb8.ky3_5
kernel-headers aarch64 5.10.0-153.12.0.92.kb8.ky3_5
python3-perf aarch64 5.10.0-153.12.0.92.kb8.ky3_5
kernel-tools-devel aarch64 5.10.0-153.12.0.92.kb8.ky3_5

5. 修复方法


方法一:下载安装包进行升级安装
1、通过下载链接下载需要升级的升级包保存,如 xxx.rpm
2、通过rpm命令升级,如 rpm -Uvh xxx.rpm

方法二:通过软件源进行升级安装
1、保持能够连接上互联网
2、通过yum命令升级指定的包,如 yum install 包名

6. 下载链接

   

KY3.5.2:

x86_64:

     kernel-tools-devel   

     perf   

     kernel-devel   

     kernel-tools   

     kernel   

     kernel-source   

     python3-perf   

     kernel-headers   

aarch64:

     perf   

     kernel-tools   

     kernel   

     kernel-source   

     kernel-devel   

     kernel-headers   

     python3-perf   

     kernel-tools-devel   

上一篇:KylinSec-SA-2024-4775 下一篇:KylinSec-SA-2024-4595