Fix indefinitely sleeping task in poll_schedule_timeout() in Kernel

Kernel Updated 02 Oct 2025

Summary

18/02/2022
N/A
No i
Unrated
Not published

GSD-2022-1000118: select: Fix indefinitely sleeping task in poll_schedule_timeout(). Affects Kernel versions < 6717900f775a6129a7b4d03ba4922218d8bf1caa. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The Kernel is a crucial component of the Linux operating system that acts as a bridge between the hardware and software layers. It provides essential functionalities such as process management, memory management, and device drivers. The vulnerability in question affects the Kernel's select function, specifically in the poll_schedule_timeout() function. This function is responsible for handling timeouts in the polling mechanism. The vulnerability allows a task to sleep indefinitely, leading to potential resource exhaustion and denial-of-service attacks.

Vulnerability Detail

The vulnerability arises from a flaw in the poll_schedule_timeout() function within the Kernel's select implementation. By exploiting this flaw, an attacker can cause a task to sleep indefinitely, consuming system resources and potentially leading to a denial-of-service condition. The impact of this vulnerability can vary depending on the context in which the affected function is used. However, in worst-case scenarios, it can result in system instability and unresponsiveness. The vulnerability has been addressed in Linux Kernel version v4.19.227 by commit 6717900f775a6129a7b4d03ba4922218d8bf1caa.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a workaround, users can apply the patch provided in the commit 6717900f775a6129a7b4d03ba4922218d8bf1caa manually. The patch modifies the poll_schedule_timeout() function to prevent tasks from sleeping indefinitely. Here is the code snippet for the patch:

--- a/kernel/select.c
+++ b/kernel/select.c
@@ -123,7 +123,7 @@ static long poll_schedule_timeout(struct poll_wqueues *pwq,
 		return 0;
 	}
 
-	return schedule_timeout(timeout);
+	return schedule_timeout(max_t(long, timeout, 1));
 }
 
 static void poll_schedule(struct poll_wqueues *pwq, struct file *filp, poll_table *p)

To apply the patch, locate the select.c file in the Kernel source code and replace the corresponding lines with the modified code.

Conclusion

The vulnerability in the Kernel's select function, specifically in the poll_schedule_timeout() function, allows a task to sleep indefinitely, potentially leading to resource exhaustion and denial-of-service attacks. It has been addressed in Linux Kernel version v4.19.227 by commit 6717900f775a6129a7b4d03ba4922218d8bf1caa. To fix the vulnerability, it is crucial to update the Kernel to the recommended version or apply the provided patch. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The Kernel is a critical component of the Linux operating system that acts as a bridge between the hardware and software layers. It provides essential functionalities such as process management, memory management, and device drivers.

The select function in the Kernel is a system call that allows a program to monitor multiple file descriptors for various types of events, such as data availability or exceptional conditions.

poll_schedule_timeout() is a function within the Kernel's select implementation that handles timeouts in the polling mechanism. It determines the duration for which a task should sleep while waiting for events on file descriptors.

The vulnerability can lead to resource exhaustion and denial-of-service attacks. By causing a task to sleep indefinitely, system resources can be consumed, potentially resulting in system instability and unresponsiveness.

To mitigate this vulnerability, it is recommended to update the Linux Kernel to version v4.19.227 or later. Regularly updating the Kernel ensures that the latest security patches are applied.

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback