Integer Overflow or Wraparound Affecting kernel-rt-debug-modules-core package, versions *


Severity

Recommended
0.0
medium
0
10

Based on Red Hat Enterprise Linux security rating.

Threat Intelligence

EPSS
0.04% (6th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RHEL9-KERNELRTDEBUGMODULESCORE-8261602
  • published23 Oct 2024
  • disclosed21 Oct 2024

Introduced: 21 Oct 2024

CVE-2024-50018  (opens in a new tab)
CWE-190  (opens in a new tab)
First added by Snyk

How to fix?

There is no fixed version for RHEL:9 kernel-rt-debug-modules-core.

NVD Description

Note: Versions mentioned in the description apply only to the upstream kernel-rt-debug-modules-core package and not the kernel-rt-debug-modules-core package as distributed by RHEL. See How to fix? for RHEL:9 relevant fixed versions and status.

In the Linux kernel, the following vulnerability has been resolved:

net: napi: Prevent overflow of napi_defer_hard_irqs

In commit 6f8b12d661d0 ("net: napi: add hard irqs deferral feature") napi_defer_irqs was added to net_device and napi_defer_irqs_count was added to napi_struct, both as type int.

This value never goes below zero, so there is not reason for it to be a signed int. Change the type for both from int to u32, and add an overflow check to sysfs to limit the value to S32_MAX.

The limit of S32_MAX was chosen because the practical limit before this patch was S32_MAX (anything larger was an overflow) and thus there are no behavioral changes introduced. If the extra bit is needed in the future, the limit can be raised.

Before this patch:

$ sudo bash -c 'echo 2147483649 > /sys/class/net/eth4/napi_defer_hard_irqs' $ cat /sys/class/net/eth4/napi_defer_hard_irqs -2147483647

After this patch:

$ sudo bash -c 'echo 2147483649 > /sys/class/net/eth4/napi_defer_hard_irqs' bash: line 0: echo: write error: Numerical result out of range

Similarly, /sys/class/net/XXXXX/tx_queue_len is defined as unsigned:

include/linux/netdevice.h: unsigned int tx_queue_len;

And has an overflow check:

dev_change_tx_queue_len(..., unsigned long new_len):

if (new_len != (unsigned int)new_len) return -ERANGE;

CVSS Scores

version 3.1