SoylentNews
SoylentNews is people
https://soylentnews.org/

Title    Nasty Linux Kernel Bug Found and Fixed
Date    Sunday January 23 2022, @07:18PM
Author    martyb
Topic   
from the we-are-not-talking-about-popcorn dept.
https://soylentnews.org/article.pl?sid=22/01/22/0314253

upstart writes:

In this one, there's a heap overflow bug in the legacy_parse_param in the Linux kernel's fs/fs_context.c program. This parameter is used in Linux filesystems during superblock creation for mount and superblock reconfiguration for a remount. The superblock records all of a filesystem's characteristics such as file size, block size, empty and filled storage blocks. So, yeah, it's important.

The legacy_parse_param() "PAGE_SIZE - 2 - size" calculation was mistakenly made anunsigned type. This means a large value of "size" results in a high positive value instead of a negative value as expected. Whoops.

This, in turn, meant you copy data beyond the memory slab allocated for it. And, as all programmers know, writing beyond the memory your program is supposed to have access to is a terrible thing.

[...] So, how bad is it? By the Common Vulnerability Scoring System (CVSS) v3.1 scoring test, it's a solid 7.7. That's considered a high-security vulnerability.

A local attacker can use it to escalate their user privileges or crash the system. This can be done with a specially crafted program that triggers this integer overflow. That done, it's trivial to execute arbitrary code and give the attacker root privileges.

To exploit it requires the CAP_SYS_ADMIN privilege to be enabled. If that's the case,  an unprivileged local user can open a filesystem that does not support the File System Context application programming interface (API). In this situation, it drops back to legacy handling, and from there, the flaw can escalate an attacker's system privileges.

[...] This security hole was introduced back on Feb 28, 2019, in the Linux 5.1-rc1 kernel. It's now present in all Linux kernels. Yes, all of them. Fortunately, the patch is in.


Original Submission

Links

  1. "upstart" - https://soylentnews.org/~upstart/
  2. "calculation was mistakenly made an" - https://www.spinics.net/lists/stable/msg526298.html
  3. "unsigned type" - https://www.spinics.net/lists/stable/msg526298.html
  4. "Linux 5.1-rc1 kernel" - https://github.com/torvalds/linux/commit/3e1aeb00e6d132efc151dacc062b38269bc9eccc#diff-c4a9ea83de4a42a0d1bcbaf1f03ce35188f38da4987e0e7a52aae7f04de14a05
  5. "Fortunately, the patch is in" - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=722d94847de29310e8aa03fcbdb41fc92c521756
  6. "Original Submission" - https://soylentnews.org/submit.pl?op=viewsub&subid=53451

© Copyright 2024 - SoylentNews, All Rights Reserved

printed from SoylentNews, Nasty Linux Kernel Bug Found and Fixed on 2024-04-19 09:43:53