New York Tech Media
  • News
  • FinTech
  • AI & Robotics
  • Cybersecurity
  • Startups & Leaders
  • Venture Capital
No Result
View All Result
  • News
  • FinTech
  • AI & Robotics
  • Cybersecurity
  • Startups & Leaders
  • Venture Capital
No Result
View All Result
New York Tech Media
No Result
View All Result
Home Cybersecurity

New Linux kernel memory corruption bug causes full system compromise

New York Tech Editorial Team by New York Tech Editorial Team
October 20, 2021
in Cybersecurity
0
New Linux kernel memory corruption bug causes full system compromise
Share on FacebookShare on Twitter

Researchers dubbed it a “straightforward Linux kernel locking bug” that they exploited against Debian Buster’s 4.19.0.13-amd64 kernel.

In 2017, MacAfee researchers disclosed a memory corruption bug inside the Linux kernel’s UDP fragmentation offload (UFO) that allowed unauthorized individuals to gain local privilege escalation. The bug affected both IPv4 and IPv6 code paths running kernel version 4.8.0 of Ubuntu xenial and was fixed in Commit 85f1bd9.

Now, Google’s Project Zero team has shared details of a similar yet much simpler bug that can cause complete system compromise. Researchers dubbed it a “straightforward Linux kernel locking bug” that they exploited against Debian Buster’s 4.19.0.13-amd64 kernel.

About the Bug

According to the Project Zero blog post, the bug was located in the ioctl handler tiocspgrp. The pgrp member of the terminal side (real_tty) was modified to exploit it while the old and new process groups’ reference count was adjusted accordingly using put_pid and get_pid.

SEE: iPhone 13 Pro, Windows, Chrome, Linux and others pwned at Tianfu Cup

The lock is taken on tty, which depending on the file descriptor that the researchers passed to ioctl(), can be any end of the pseudoterminal pair. So, they called the TIOCSPGRP ioctl on both sides of the pseudoterminal so that data races between concurrent accesses to the pgrp member, causing reference counts to become skewed through several races. 

Jann Horn of Google’s Project Zero identified that the refcount of the old struct pid showed decrement by 1 too much in both cases while A’s or B’s were incremented by 1 too much.

A proof of concept is also released by the team and is available here.

How it Attacks

Research further revealed that the memory corruption bug allows an attacker to skew the refcount of a struct pid down whichever way the race happens. Researchers revealed that they could run colliding TIOCSPGRP calls from two threads repeatedly, which messed up the refcount often. However, they couldn’t determine the number of times the refcount skew actually occurred. 

Moreover, the SLUB allocator was replacing the first 8 bytes when the object was freed with an XOR-obfuscated freelist pointer. Hence, the count and level fields were rendered useless.

“This means that the load from pid->numbers[pid -> level] will now be at some random offset from the pid, in the range from zero to 64 GiB. As long as the machine doesn’t have tons of RAM, this will likely cause a kernel segmentation fault,” Horn wrong in a blog post.

Hence, a somewhat more straightforward way to exploit a dangling reference to a SLUB object is reallocating the object via the same kmem_cache it came from and preventing the page from reaching the page allocator.

Another way to exploit the UAF at the SLUB allocator level is flushing the page out to the page allocator aka buddy allocator. This is the last level of dynamic memory allocation on the Linux system as from there, the page can end up in any context.

“At the point where the victim page has reached the page allocator’s freelist, it’s essentially game over – at this point, the page can be reused as anything in the system, giving us a broad range of options for exploitation. In my opinion, most defenses that act after we’ve reached this point are fairly unreliable,” the blog post read.

Page tables are a type of allocation directly served from the page allocator, and their ability to modify a page can be abused by enabling the read/write bit in a page table entry that maps a file page that is supposed to offer read access. This abuse can lead to gaining write access to a portion of a setuid binary’s .text segment and rewritten with malicious code.

SEE: Beware- FontOnLake Rootkit Malware Attacking Linux Systems

Although it is hard to determine the victim page’s offset in which the victim object is located, a page table comprises an array of size 8, 8-byte-aligned elements. The victim object is a multiple of that, so unless all array elements are sprayed, the attacker won’t need to know the object’s offset.

“Struct pid has the same alignment as a PTE, and it starts with a 32-bit refcount so that refcount is guaranteed to overlap the first half of a PTE, which is 64-bit. Therefore we can increment one of the PTEs by repeatedly triggering get_pid(), which tries to increment the refcount of the freed object. If the kernel notices the Dirty bit, later on, that might trigger writeback, which could crash the kernel if the mapping isn’t set up for writing.”

Did you enjoy reading this article? Like our page on Facebook and follow us on Twitter.


Credit: Source link

Previous Post

Carlyle and Leading Healthcare-Focused Venture Funds Announce Strategic Growth Investment of up to $430 Million in Saama

Next Post

VC Investment Soars For Fertility Services Even As Birthrate Dips – Crunchbase News

New York Tech Editorial Team

New York Tech Editorial Team

New York Tech Media is a leading news publication that aims to provide the latest tech news, fintech, AI & robotics, cybersecurity, startups & leaders, venture capital, and much more!

Next Post
VC Investment Soars For Fertility Services Even As Birthrate Dips – Crunchbase News

VC Investment Soars For Fertility Services Even As Birthrate Dips – Crunchbase News

  • Trending
  • Comments
  • Latest
Meet the Top 10 K-Pop Artists Taking Over 2024

Meet the Top 10 K-Pop Artists Taking Over 2024

March 17, 2024
Panther for AWS allows security teams to monitor their AWS infrastructure in real-time

Many businesses lack a formal ransomware plan

March 29, 2022
Zach Mulcahey, 25 | Cover Story | Style Weekly

Zach Mulcahey, 25 | Cover Story | Style Weekly

March 29, 2022
10 Raunchy Movies on Netflix You Won’t Regret Watching

10 Raunchy Movies on Netflix You Won’t Regret Watching

May 20, 2024
How To Pitch The Investor: Ronen Menipaz, Founder of M51

How To Pitch The Investor: Ronen Menipaz, Founder of M51

March 29, 2022
Japanese Space Industry Startup “Synspective” Raises US $100 Million in Funding

Japanese Space Industry Startup “Synspective” Raises US $100 Million in Funding

March 29, 2022
Startups On Demand: renovai is the Netflix of Online Shopping

Startups On Demand: renovai is the Netflix of Online Shopping

2
Robot Company Offers $200K for Right to Use One Applicant’s Face and Voice ‘Forever’

Robot Company Offers $200K for Right to Use One Applicant’s Face and Voice ‘Forever’

1
Menashe Shani Accessibility High Tech on the low

Revolutionizing Accessibility: The Story of Purple Lens

1

Netgear announces a $1,500 Wi-Fi 6E mesh router

0
These apps let you customize Windows 11 to bring the taskbar back to life

These apps let you customize Windows 11 to bring the taskbar back to life

0
This bipedal robot uses propeller arms to slackline and skateboard

This bipedal robot uses propeller arms to slackline and skateboard

0
laptop on glass table

Automat-it Cuts Deployment Friction as Monce Scales AI Order Processing on AWS

April 13, 2026
Lee's Famous Recipe Chicken

Why Lee’s Famous Recipe Chicken Is Betting on Hi Auto to Quietly Rewire the Drive-Thru

April 9, 2026
computer generated image of letters

San Francisco Tribune Lists 11 HumanX Startups Moving AI Closer to the Operating Core

April 8, 2026
Impala CEO and Highrise AI CEO

The Industrialization of AI Infrastructure: What Impala and Highrise AI Reveal About the Next Scaling Frontier

April 7, 2026
Employee Time Tracking

What is an Employee Time Tracking Solution? A Definite Guide for 2026

March 31, 2026
Voltify founders

Voltify Raises $30 Million Seed Round as It Challenges $1 Trillion Rail Electrification Model

March 31, 2026

Recommended

laptop on glass table

Automat-it Cuts Deployment Friction as Monce Scales AI Order Processing on AWS

April 13, 2026
Lee's Famous Recipe Chicken

Why Lee’s Famous Recipe Chicken Is Betting on Hi Auto to Quietly Rewire the Drive-Thru

April 9, 2026
computer generated image of letters

San Francisco Tribune Lists 11 HumanX Startups Moving AI Closer to the Operating Core

April 8, 2026
Impala CEO and Highrise AI CEO

The Industrialization of AI Infrastructure: What Impala and Highrise AI Reveal About the Next Scaling Frontier

April 7, 2026

Categories

  • AI & Robotics
  • Benzinga
  • Cybersecurity
  • FinTech
  • New York Tech
  • News
  • Startups & Leaders
  • Venture Capital

Tags

AI AI QSRs Allseated Automat-it AWS B2B marketing Business CISO CISO Whisperer Collaborations Companies To Watch cryptocurrency Cybersecurity Entrepreneur Fetcherr Finance FINQ Fintech Funding Announcement hi-tech Hi Auto Impala Investing Investors investorsummit Israel israelitech Leaders LinkedIn Leaders Metaverse Mindset Minnesota omri hurwitz PointFive PR QSR Real Estate start- up startupnation Startups Startups On Demand Tech Tech leaders Unlimited Robotics VC
  • Contact Us
  • Privacy Policy
  • Terms and conditions

© 2024 All Rights Reserved - New York Tech Media

No Result
View All Result
  • News
  • FinTech
  • AI & Robotics
  • Cybersecurity
  • Startups & Leaders
  • Venture Capital

© 2024 All Rights Reserved - New York Tech Media