Linux Kernel up to 6.0.8 net tun_get_user memory leak

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
4.6$0-$5k0.00

Summaryinfo

A vulnerability marked as critical has been reported in Linux Kernel up to 4.19.266/5.4.224/5.10.154/5.15.78/6.0.8. This affects the function tun_get_user of the component net. This manipulation causes memory leak. This vulnerability is registered as CVE-2022-49871. No exploit is available. It is suggested to upgrade the affected component.

Detailsinfo

A vulnerability classified as critical was found in Linux Kernel up to 4.19.266/5.4.224/5.10.154/5.15.78/6.0.8. Affected by this vulnerability is the function tun_get_user of the component net. The manipulation with an unknown input leads to a memory leak vulnerability. The CWE definition for the vulnerability is CWE-401. The product does not sufficiently track and release allocated memory after it has been used, which slowly consumes remaining memory. As an impact it is known to affect availability. The summary by CVE is:

In the Linux kernel, the following vulnerability has been resolved: net: tun: Fix memory leaks of napi_get_frags kmemleak reports after running test_progs: unreferenced object 0xffff8881b1672dc0 (size 232): comm "test_progs", pid 394388, jiffies 4354712116 (age 841.975s) hex dump (first 32 bytes): e0 84 d7 a8 81 88 ff ff 80 2c 67 b1 81 88 ff ff .........,g..... 00 40 c5 9b 81 88 ff ff 00 00 00 00 00 00 00 00 .@.............. backtrace: [] napi_skb_cache_get+0xd4/0x150 [] __napi_build_skb+0x15/0x50 [] __napi_alloc_skb+0x26e/0x540 [] napi_get_frags+0x59/0x140 [] tun_get_user+0x183d/0x3bb0 [tun] [] tun_chr_write_iter+0xc0/0x1b1 [tun] [] do_iter_readv_writev+0x19f/0x320 [] do_iter_write+0x135/0x630 [] vfs_writev+0x12e/0x440 [] do_writev+0x104/0x280 [] do_syscall_64+0x3b/0x90 [] entry_SYSCALL_64_after_hwframe+0x63/0xcd The issue occurs in the following scenarios: tun_get_user() napi_gro_frags() napi_frags_finish() case GRO_NORMAL: gro_normal_one() list_add_tail(&skb->list, &napi->rx_list); rx_count < READ_ONCE(gro_normal_batch), rx_list is not empty <-- not ask to complete the gro work, will cause memory leaks in <-- following tun_napi_del() ... tun_napi_del() netif_napi_del() __netif_napi_del() rx_list is not empty, which caused memory leaks To fix, add napi_complete() after napi_gro_frags().

The advisory is shared at git.kernel.org. This vulnerability is known as CVE-2022-49871 since 05/01/2025. The exploitation appears to be difficult. Technical details are known, but no exploit is available.

The vulnerability scanner Nessus provides a plugin with the ID 240793 (SUSE SLES12 Security Update : kernel (SUSE-SU-2025:01983-1)), which helps to determine the existence of the flaw in a target environment.

Upgrading to version 4.19.267, 5.4.225, 5.10.155, 5.15.79 or 6.0.9 eliminates this vulnerability. Applying the patch 223ef6a94e52331a6a7ef31e59921e0e82d2d40a/a4f73f6adc53fd7a3f9771cbc89a03ef39b0b755/3401f964028ac941425b9b2c8ff8a022539ef44a/d7569302a7a52a9305d2fb054df908ff985553bb/8b12a020b20a78f62bedc50f26db3bf4fadf8cb9/1118b2049d77ca0b505775fc1a8d1909cf19a7ec is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.

The vulnerability is also documented in the vulnerability database at Tenable (240793). If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 4.8
VulDB Meta Temp Score: 4.6

VulDB Base Score: 4.8
VulDB Temp Score: 4.6
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

Exploitinginfo

Class: Memory leak
CWE: CWE-401 / CWE-404
CAPEC: 🔍
ATT&CK: 🔍

Physical: No
Local: No
Remote: Partially

Availability: 🔍
Status: Not defined

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 240793
Nessus Name: SUSE SLES12 Security Update : kernel (SUSE-SU-2025:01983-1)

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔍

Upgrade: Kernel 4.19.267/5.4.225/5.10.155/5.15.79/6.0.9
Patch: 223ef6a94e52331a6a7ef31e59921e0e82d2d40a/a4f73f6adc53fd7a3f9771cbc89a03ef39b0b755/3401f964028ac941425b9b2c8ff8a022539ef44a/d7569302a7a52a9305d2fb054df908ff985553bb/8b12a020b20a78f62bedc50f26db3bf4fadf8cb9/1118b2049d77ca0b505775fc1a8d1909cf19a7ec

Timelineinfo

05/01/2025 🔍
05/01/2025 +0 days 🔍
05/01/2025 +0 days 🔍
06/28/2025 +58 days 🔍

Sourcesinfo

Vendor: kernel.org

Advisory: git.kernel.org
Status: Confirmed

CVE: CVE-2022-49871 (🔍)
GCVE (CVE): GCVE-0-2022-49871
GCVE (VulDB): GCVE-100-307045

Entryinfo

Created: 05/01/2025 19:01
Updated: 06/28/2025 05:26
Changes: 05/01/2025 19:01 (59), 06/28/2025 05:26 (2)
Complete: 🔍
Cache ID: 216::103

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you want to use VulDB in your project?

Use the official API to access entries easily!