• Trend Micro
  • About TrendLabs Security Intelligence Blog
Search:
  • Home
  • Categories
    • Ransomware
    • Vulnerabilities
    • Exploits
    • Targeted Attacks
    • Deep Web
    • Mobile
    • Internet of Things
    • Malware
    • Bad Sites
    • Spam
    • Botnets
    • Social
    • Open source
Home   »   Vulnerabilities   »   systemd Vulnerability Leads to Denial of Service on Linux

systemd Vulnerability Leads to Denial of Service on Linux

  • Posted on:November 23, 2017 at 4:00 am
  • Posted in:Vulnerabilities
  • Author:
    William Gamazo Sanchez (Vulnerability Research)
0

Many Linux distributions are at risk due to a recently disclosed flaw in systemd: a flaw in its DNS resolver could cause a denial-of-service attack on vulnerable systems. The vulnerability is exploited by having the vulnerable system send a DNS query to a DNS server controlled by the attackers. The DNS server would then return a specially crafted query, causing systemd to enter an infinite loop that pins the system’s CPU usage to 100%. This vulnerability was assigned CVE-2017-15908.

There are multiple ways to get the user to query a DNS server under the control of a threat actor, but the easiest would be to get the user’s system to visit a domain controlled by the attacker. This could be done using malware or social engineering.

The most effective fix for this flaw is to patch the underlying flaw in systemd. We first discovered this flaw in July of this year and reported it to the appropriate vendors via the Zero-Day Initiative (ZDI) in the same month. Independent researchers found the same vulnerability in October of this year and reported it to Canonical. Fixes were rolled out to various Linux distributions such as Ubuntu in late October as well. Fortunately, no attacks against this vulnerability are known to be in the wild yet.

Analysis of the Vulnerability

New functions have been added to DNS over time, both to add new features and make it more secure. One of the new types of resource records added in DNS Security Extensions (DNSSEC), as defined in RFC 4034, was the NSEC (Next Secure) record.

The vulnerability lies in the processing of the bits representing pseudo-types in the NSEC bitmap. The image below shows the code section and stack frame. The highlighted line “continue” shows where the “while loop” enters an infinite loop. The dns_packet_read_type_window() implementation is in the file resolved-dns-packet.c.

Figure 1. Source code of infinite loop and stack frame

Note that the above function dns_packet_read_type_window() is called from dns_packet_read_rr()when the record type is DNS_TYPE_NSEC. The image below shows the code section of dns_packet_read_rr() in the file resolved-dns-packet.c.

Figure 2. Source code of reading DNS packets

Proof of Concept

To test this vulnerability, we created a custom DNS server which would send back maliciously formed replies. This reply contained an NSEC record designed to trigger the vulnerability, as seen below:

Figure 3. Packet capture of specially crafted DNS reply

Once a system running systemd uses it for DNS resolution, it will receive this specially crafted DNS packet, and the CPU utilization would hit 100%, as seen here:

Figure 4. Maximized CPU utilization

Mitigation

As we noted earlier, fixes to this vulnerability have been released. We recommend applying these to systems at risk as soon as possible.

System administrators may also opt to block potentially malicious packets manually. Incoming DNS responses should be checked to see if they contain resource records as specified in section 4 of RFC 4034.

Monitor incoming DNS response traffic and detect if the DNS RRs in the answer section contains DNS and record of types as specified in the RFC 4034 section 4, which defines NSEC RRs. If the attached bitmap is processed and contains pseudo-types, it should be blocked.

Related posts:

  • CVE-2017-0780: Denial-of-Service Vulnerability can Crash Android Messages App
  • Vulnerability in F2FS File System Leads To Memory Corruption on Android, Linux
  • New Linux Malware Exploits CGI Vulnerability
  • IIS 6.0 Vulnerability Leads to Code Execution
Learn how to protect Enterprises, Small Businesses, and Home Users from ransomware:
ENTERPRISE »
SMALL BUSINESS»
HOME»
Tags: CVE-2017-15908systemd

Featured Stories

  • systemd Vulnerability Leads to Denial of Service on Linux
  • qkG Filecoder: Self-Replicating, Document-Encrypting Ransomware
  • Mitigating CVE-2017-5689, an Intel Management Engine Vulnerability
  • A Closer Look at North Korea’s Internet
  • From Cybercrime to Cyberpropaganda

Security Predictions for 2018

  • Attackers are banking on network vulnerabilities and inherent weaknesses to facilitate massive malware attacks, IoT hacks, and operational disruptions. The ever-shifting threats and increasingly expanding attack surface will challenge users and enterprises to catch up with their security.
    Read our security predictions for 2018.

Business Process Compromise

  • Attackers are starting to invest in long-term operations that target specific processes enterprises rely on. They scout for vulnerable practices, susceptible systems and operational loopholes that they can leverage or abuse. To learn more, read our Security 101: Business Process Compromise.

Latest Ransomware Posts

  • qkG Filecoder: Self-Replicating, Document-Encrypting Ransomware
  • Bad Rabbit Ransomware Spreads via Network, Hits Ukraine and Russia
  • A Look at Locky Ransomware’s Recent Spam Activities
  • Magnitude Exploit Kit Now Targeting South Korea With Magniber Ransomware
  • WannaCry Ransomware Sold in the Middle Eastern and North African Underground

Recent Posts

  • January’s Patch Tuesday Fixes 56 Security Issues, Including Meltdown and Spectre
  • First Kotlin-Developed Malicious App Signs Users Up for Premium SMS Services
  • When Speculation Is Risky: Understanding Meltdown and Spectre
  • Apps Disguised as Security Tools Bombard Users With Ads and Track Users’ Location
  • The Need for Better Built-in Security in IoT Devices

Ransomware 101

  • This infographic shows how ransomware has evolved, how big the problem has become, and ways to avoid being a ransomware victim.
    Check the infographic

Popular Posts

  • Digmine Cryptocurrency Miner Spreading via Facebook Messenger
  • The Need for Better Built-in Security in IoT Devices
  • Apps Disguised as Security Tools Bombard Users With Ads and Track Users’ Location
  • CVE-2017-11882 Exploited to Deliver a Cracked Version of the Loki Infostealer
  • When Speculation Is Risky: Understanding Meltdown and Spectre

Latest Tweets

  • An installer for a new #Monero miner transmits mined #cryptocurrency to a university in North Korea. bit.ly/2AKUkjN
    about 1 hour ago
  • What else do we need to know about #Meltdown and #Spectre? We explain what these flaws are and how they can be miti… twitter.com/i/web/status/9…
    about 5 hours ago
  • @xiaolang8002 Hi! Yes, the apps were already removed from Google Play.
    about 11 hours ago

Stay Updated

  • Home and Home Office
  • |
  • For Business
  • |
  • Security Intelligence
  • |
  • About Trend Micro
  • Asia Pacific Region (APAC): Australia / New Zealand, 中国, 日本, 대한민국, 台灣
  • Latin America Region (LAR): Brasil, México
  • North America Region (NABU): United States, Canada
  • Europe, Middle East, & Africa Region (EMEA): France, Deutschland / Österreich / Schweiz, Italia, Россия, España, United Kingdom / Ireland
  • Privacy Statement
  • Legal Policies
  • Copyright © Trend Micro Incorporated. All rights reserved.