OESA-2024-1244

Source
https://www.openeuler.org/en/security/security-bulletins/detail/?id=openEuler-SA-2024-1244
Import Source
https://repo.openeuler.org/security/data/osv/OESA-2024-1244.json
JSON Data
https://api.test.osv.dev/v1/vulns/OESA-2024-1244
Upstream
Published
2024-03-01T11:07:08Z
Modified
2025-08-12T05:24:16.257882Z
Summary
kernel security update
Details

The Linux Kernel, the operating system core itself.

Security Fix(es):

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

net: prevent mss overflow in skb_segment()

Once again syzbot is able to crash the kernel in skb_segment() [1]

GSOBYFRAGS is a forbidden value, but unfortunately the following computation in skb_segment() can reach it quite easily :

mss = mss * partial_segs;

65535 = 3 * 5 * 17 * 257, so many initial values of mss can lead to a bad final result.

Make sure to limit segmentation so that the new mss value is smaller than GSOBYFRAGS.

[1]

general protection fault, probably for non-canonical address 0xdffffc000000000e: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000070-0x0000000000000077] CPU: 1 PID: 5079 Comm: syz-executor993 Not tainted 6.7.0-rc4-syzkaller-00141-g1ae4cd3cbdd0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 RIP: 0010:skbsegment+0x181d/0x3f30 net/core/skbuff.c:4551 Code: 83 e3 02 e9 fb ed ff ff e8 90 68 1c f9 48 8b 84 24 f8 00 00 00 48 8d 78 70 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 8a 21 00 00 48 8b 84 24 f8 00 RSP: 0018:ffffc900043473d0 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000010046 RCX: ffffffff886b1597 RDX: 000000000000000e RSI: ffffffff886b2520 RDI: 0000000000000070 RBP: ffffc90004347578 R08: 0000000000000005 R09: 000000000000ffff R10: 000000000000ffff R11: 0000000000000002 R12: ffff888063202ac0 R13: 0000000000010000 R14: 000000000000ffff R15: 0000000000000046 FS: 0000555556e7e380(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020010000 CR3: 0000000027ee2000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> udp6ufofragment+0xa0e/0xd00 net/ipv6/udpoffload.c:109 ipv6gsosegment+0x534/0x17e0 net/ipv6/ip6offload.c:120 skbmacgsosegment+0x290/0x610 net/core/gso.c:53 _skbgsosegment+0x339/0x710 net/core/gso.c:124 skbgsosegment include/net/gso.h:83 [inline] validatexmitskb+0x36c/0xeb0 net/core/dev.c:3626 _devqueuexmit+0x6f3/0x3d60 net/core/dev.c:4338 devqueuexmit include/linux/netdevice.h:3134 [inline] packetxmit+0x257/0x380 net/packet/afpacket.c:276 packetsnd net/packet/afpacket.c:3087 [inline] packetsendmsg+0x24c6/0x5220 net/packet/afpacket.c:3119 socksendmsgnosec net/socket.c:730 [inline] _socksendmsg+0xd5/0x180 net/socket.c:745 _syssendto+0x255/0x340 net/socket.c:2190 _dosyssendto net/socket.c:2202 [inline] _sesyssendto net/socket.c:2198 [inline] _x64syssendto+0xe0/0x1b0 net/socket.c:2198 dosyscallx64 arch/x86/entry/common.c:52 [inline] dosyscall64+0x40/0x110 arch/x86/entry/common.c:83 entrySYSCALL64afterhwframe+0x63/0x6b RIP: 0033:0x7f8692032aa9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 d1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fff8d685418 EFLAGS: 00000246 ORIGRAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f8692032aa9 RDX: 0000000000010048 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00000000000f4240 R08: 0000000020000540 R09: 0000000000000014 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff8d685480 R13: 0000000000000001 R14: 00007fff8d685480 R15: 0000000000000003 </TASK> Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:skb_segment+0x181d/0x3f30 net/core/skbuff.c:4551 Code: 83 e3 02 e9 fb ed ff ff e8 90 68 1c f9 48 8b 84 24 f8 00 00 00 48 8d 78 70 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 8a 21 00 00 48 8b 84 24 f8 00 RSP: 0018:ffffc900043473d0 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000010046 RCX: ffffffff886b1597 RDX: 000000000000000e RSI: ffffffff886b2520 RDI: 0000000000000070 RBP: ffffc90004347578 R0 ---truncated---(CVE-2023-52435)

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

f2fs: explicitly null-terminate the xattr list

When setting an xattr, explicitly null-terminate the xattr list. This eliminates the fragile assumption that the unused xattr space is always zeroed.(CVE-2023-52436)

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

binder: fix use-after-free in shinker's callback

The mmap read lock is used during the shrinker's callback, which means that using alloc->vma pointer isn't safe as it can race with munmap(). As of commit dd2283f2605e ("mm: mmap: zap pages with read mmap_sem in munmap") the mmap lock is downgraded after the vma has been isolated.

I was able to reproduce this issue by manually adding some delays and triggering page reclaiming through the shrinker's debug sysfs. The following KASAN report confirms the UAF:

================================================================== BUG: KASAN: slab-use-after-free in zappagerange_single+0x470/0x4b8 Read of size 8 at addr ffff356ed50e50f0 by task bash/478

CPU: 1 PID: 478 Comm: bash Not tainted 6.6.0-rc5-00055-g1c8b86a3799f-dirty #70 Hardware name: linux,dummy-virt (DT) Call trace: zappagerangesingle+0x470/0x4b8 binderallocfreepage+0x608/0xadc _listlruwalkone+0x130/0x3b0 listlruwalknode+0xc4/0x22c bindershrinkscan+0x108/0x1dc shrinkerdebugfsscanwrite+0x2b4/0x500 fullproxywrite+0xd4/0x140 vfswrite+0x1ac/0x758 ksyswrite+0xf0/0x1dc _arm64sys_write+0x6c/0x9c

Allocated by task 492: kmemcachealloc+0x130/0x368 vmareaalloc+0x2c/0x190 mmapregion+0x258/0x18bc dommap+0x694/0xa60 vmmmappgoff+0x170/0x29c ksysmmappgoff+0x290/0x3a0 _arm64sys_mmap+0xcc/0x144

Freed by task 491: kmemcachefree+0x17c/0x3c8 vmareafreercucb+0x74/0x98 rcucore+0xa38/0x26d4 rcucoresi+0x10/0x1c _do_softirq+0x2fc/0xd24

Last potentially related work creation: _callrcucommon.constprop.0+0x6c/0xba0 callrcu+0x10/0x1c vmareafree+0x18/0x24 removevma+0xe4/0x118 dovmialignmunmap.isra.0+0x718/0xb5c dovmimunmap+0xdc/0x1fc _vmmunmap+0x10c/0x278 _arm64sys_munmap+0x58/0x7c

Fix this issue by performing instead a vmalookup() which will fail to find the vma that was isolated before the mmap lock downgrade. Note that this option has better performance than upgrading to a mmap write lock which would increase contention. Plus, mmapwrite_trylock() has been recently removed anyway.(CVE-2023-52438)

A race condition was found in the Linux kernel's sound/hda device driver in sndhdacregmap_sync() function. This can result in a null pointer dereference issue, possibly leading to a kernel panic or denial of service issue.

(CVE-2024-23196)

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

mlxsw: spectrumacltcam: Fix NULL pointer dereference in error path

When calling mlxswspacltcamregion_destroy() from an error path after failing to attach the region to an ACL group, we hit a NULL pointer dereference upon 'region->group->tcam' [1].

Fix by retrieving the 'tcam' pointer using mlxswspacltotcam().

[1] BUG: kernel NULL pointer dereference, address: 0000000000000000 [...] RIP: 0010:mlxswspacltcamregiondestroy+0xa0/0xd0 [...] Call Trace: mlxswspacltcamvchunkget+0x88b/0xa20 mlxswspacltcamventryadd+0x25/0xe0 mlxswspaclruleadd+0x47/0x240 mlxswspflowerreplace+0x1a9/0x1d0 tcsetupcbadd+0xdc/0x1c0 flhwreplacefilter+0x146/0x1f0 flchange+0xc17/0x1360 tcnewtfilter+0x472/0xb90 rtnetlinkrcvmsg+0x313/0x3b0 netlinkrcvskb+0x58/0x100 netlinkunicast+0x244/0x390 netlinksendmsg+0x1e4/0x440 syssendmsg+0x164/0x260 syssendmsg+0x9a/0xe0 _syssendmsg+0x7a/0xc0 dosyscall64+0x40/0xe0 entrySYSCALL64afterhwframe+0x63/0x6b(CVE-2024-26595)

Database specific
{
    "severity": "High"
}
References

Affected packages

openEuler:22.03-LTS-SP3 / kernel

Package

Name
kernel
Purl
pkg:rpm/openEuler/kernel&distro=openEuler-22.03-LTS-SP3

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.0-189.0.0.102.oe2203sp3

Ecosystem specific

{
    "x86_64": [
        "perf-5.10.0-189.0.0.102.oe2203sp3.x86_64.rpm",
        "kernel-devel-5.10.0-189.0.0.102.oe2203sp3.x86_64.rpm",
        "kernel-tools-5.10.0-189.0.0.102.oe2203sp3.x86_64.rpm",
        "kernel-source-5.10.0-189.0.0.102.oe2203sp3.x86_64.rpm",
        "python3-perf-5.10.0-189.0.0.102.oe2203sp3.x86_64.rpm",
        "python3-perf-debuginfo-5.10.0-189.0.0.102.oe2203sp3.x86_64.rpm",
        "kernel-5.10.0-189.0.0.102.oe2203sp3.x86_64.rpm",
        "kernel-tools-debuginfo-5.10.0-189.0.0.102.oe2203sp3.x86_64.rpm",
        "perf-debuginfo-5.10.0-189.0.0.102.oe2203sp3.x86_64.rpm",
        "kernel-tools-devel-5.10.0-189.0.0.102.oe2203sp3.x86_64.rpm",
        "kernel-headers-5.10.0-189.0.0.102.oe2203sp3.x86_64.rpm",
        "kernel-debugsource-5.10.0-189.0.0.102.oe2203sp3.x86_64.rpm",
        "kernel-debuginfo-5.10.0-189.0.0.102.oe2203sp3.x86_64.rpm"
    ],
    "src": [
        "kernel-5.10.0-189.0.0.102.oe2203sp3.src.rpm"
    ],
    "aarch64": [
        "kernel-tools-5.10.0-189.0.0.102.oe2203sp3.aarch64.rpm",
        "kernel-5.10.0-189.0.0.102.oe2203sp3.aarch64.rpm",
        "kernel-headers-5.10.0-189.0.0.102.oe2203sp3.aarch64.rpm",
        "perf-5.10.0-189.0.0.102.oe2203sp3.aarch64.rpm",
        "perf-debuginfo-5.10.0-189.0.0.102.oe2203sp3.aarch64.rpm",
        "python3-perf-5.10.0-189.0.0.102.oe2203sp3.aarch64.rpm",
        "kernel-source-5.10.0-189.0.0.102.oe2203sp3.aarch64.rpm",
        "kernel-devel-5.10.0-189.0.0.102.oe2203sp3.aarch64.rpm",
        "kernel-tools-devel-5.10.0-189.0.0.102.oe2203sp3.aarch64.rpm",
        "kernel-tools-debuginfo-5.10.0-189.0.0.102.oe2203sp3.aarch64.rpm",
        "python3-perf-debuginfo-5.10.0-189.0.0.102.oe2203sp3.aarch64.rpm",
        "kernel-debugsource-5.10.0-189.0.0.102.oe2203sp3.aarch64.rpm",
        "kernel-debuginfo-5.10.0-189.0.0.102.oe2203sp3.aarch64.rpm"
    ]
}