Bug 2297474 (CVE-2024-39502) - CVE-2024-39502 kernel: ionic: fix use after netif_napi_del()
Summary: CVE-2024-39502 kernel: ionic: fix use after netif_napi_del()
Keywords:
Status: NEW
Alias: CVE-2024-39502
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-07-12 13:22 UTC by OSIDB Bzimport
Modified: 2024-09-04 00:25 UTC (History)
4 users (show)

Fixed In Version: kernel 5.4.279, kernel 5.10.221, kernel 5.15.162, kernel 6.1.95, kernel 6.6.35, kernel 6.9.6, kernel 6.10-rc4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2024:5117 0 None None None 2024-08-08 08:35:48 UTC
Red Hat Product Errata RHBA-2024:5207 0 None None None 2024-08-12 07:54:54 UTC
Red Hat Product Errata RHBA-2024:5208 0 None None None 2024-08-12 08:34:15 UTC
Red Hat Product Errata RHBA-2024:5233 0 None None None 2024-08-12 13:53:38 UTC
Red Hat Product Errata RHBA-2024:5235 0 None None None 2024-08-12 14:26:24 UTC
Red Hat Product Errata RHBA-2024:5236 0 None None None 2024-08-12 14:42:33 UTC
Red Hat Product Errata RHBA-2024:5237 0 None None None 2024-08-12 14:45:51 UTC
Red Hat Product Errata RHBA-2024:5386 0 None None None 2024-08-14 10:50:12 UTC
Red Hat Product Errata RHBA-2024:5538 0 None None None 2024-08-19 06:09:40 UTC
Red Hat Product Errata RHBA-2024:5866 0 None None None 2024-08-26 14:40:52 UTC
Red Hat Product Errata RHSA-2024:5101 0 None None None 2024-08-08 04:58:11 UTC
Red Hat Product Errata RHSA-2024:5102 0 None None None 2024-08-08 04:46:29 UTC
Red Hat Product Errata RHSA-2024:5256 0 None None None 2024-08-13 00:11:06 UTC
Red Hat Product Errata RHSA-2024:5257 0 None None None 2024-08-13 00:17:07 UTC
Red Hat Product Errata RHSA-2024:5266 0 None None None 2024-08-13 07:26:13 UTC
Red Hat Product Errata RHSA-2024:5281 0 None None None 2024-08-13 14:34:00 UTC
Red Hat Product Errata RHSA-2024:5282 0 None None None 2024-08-13 14:26:50 UTC
Red Hat Product Errata RHSA-2024:6206 0 None None None 2024-09-03 15:43:34 UTC
Red Hat Product Errata RHSA-2024:6267 0 None None None 2024-09-04 00:25:35 UTC
Red Hat Product Errata RHSA-2024:6268 0 None None None 2024-09-04 00:11:37 UTC

Description OSIDB Bzimport 2024-07-12 13:22:34 UTC
In the Linux kernel, the following vulnerability has been resolved:

ionic: fix use after netif_napi_del()

When queues are started, netif_napi_add() and napi_enable() are called.
If there are 4 queues and only 3 queues are used for the current
configuration, only 3 queues' napi should be registered and enabled.
The ionic_qcq_enable() checks whether the .poll pointer is not NULL for
enabling only the using queue' napi. Unused queues' napi will not be
registered by netif_napi_add(), so the .poll pointer indicates NULL.
But it couldn't distinguish whether the napi was unregistered or not
because netif_napi_del() doesn't reset the .poll pointer to NULL.
So, ionic_qcq_enable() calls napi_enable() for the queue, which was
unregistered by netif_napi_del().

Reproducer:
   ethtool -L <interface name> rx 1 tx 1 combined 0
   ethtool -L <interface name> rx 0 tx 0 combined 1
   ethtool -L <interface name> rx 0 tx 0 combined 4

Splat looks like:
kernel BUG at net/core/dev.c:6666!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
CPU: 3 PID: 1057 Comm: kworker/3:3 Not tainted 6.10.0-rc2+ #16
Workqueue: events ionic_lif_deferred_work [ionic]
RIP: 0010:napi_enable+0x3b/0x40
Code: 48 89 c2 48 83 e2 f6 80 b9 61 09 00 00 00 74 0d 48 83 bf 60 01 00 00 00 74 03 80 ce 01 f0 4f
RSP: 0018:ffffb6ed83227d48 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff97560cda0828 RCX: 0000000000000029
RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff97560cda0a28
RBP: ffffb6ed83227d50 R08: 0000000000000400 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
R13: ffff97560ce3c1a0 R14: 0000000000000000 R15: ffff975613ba0a20
FS:  0000000000000000(0000) GS:ffff975d5f780000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8f734ee200 CR3: 0000000103e50000 CR4: 00000000007506f0
PKRU: 55555554
Call Trace:
 <TASK>
 ? die+0x33/0x90
 ? do_trap+0xd9/0x100
 ? napi_enable+0x3b/0x40
 ? do_error_trap+0x83/0xb0
 ? napi_enable+0x3b/0x40
 ? napi_enable+0x3b/0x40
 ? exc_invalid_op+0x4e/0x70
 ? napi_enable+0x3b/0x40
 ? asm_exc_invalid_op+0x16/0x20
 ? napi_enable+0x3b/0x40
 ionic_qcq_enable+0xb7/0x180 [ionic 59bdfc8a035436e1c4224ff7d10789e3f14643f8]
 ionic_start_queues+0xc4/0x290 [ionic 59bdfc8a035436e1c4224ff7d10789e3f14643f8]
 ionic_link_status_check+0x11c/0x170 [ionic 59bdfc8a035436e1c4224ff7d10789e3f14643f8]
 ionic_lif_deferred_work+0x129/0x280 [ionic 59bdfc8a035436e1c4224ff7d10789e3f14643f8]
 process_one_work+0x145/0x360
 worker_thread+0x2bb/0x3d0
 ? __pfx_worker_thread+0x10/0x10
 kthread+0xcc/0x100
 ? __pfx_kthread+0x10/0x10
 ret_from_fork+0x2d/0x50
 ? __pfx_kthread+0x10/0x10
 ret_from_fork_asm+0x1a/0x30

Comment 11 errata-xmlrpc 2024-08-08 04:46:28 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:5102 https://access.redhat.com/errata/RHSA-2024:5102

Comment 12 errata-xmlrpc 2024-08-08 04:58:10 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:5101 https://access.redhat.com/errata/RHSA-2024:5101

Comment 14 errata-xmlrpc 2024-08-13 00:11:04 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions

Via RHSA-2024:5256 https://access.redhat.com/errata/RHSA-2024:5256

Comment 15 errata-xmlrpc 2024-08-13 00:17:06 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions

Via RHSA-2024:5257 https://access.redhat.com/errata/RHSA-2024:5257

Comment 16 errata-xmlrpc 2024-08-13 07:26:12 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions
  Red Hat Enterprise Linux 8.4 Telecommunications Update Service

Via RHSA-2024:5266 https://access.redhat.com/errata/RHSA-2024:5266

Comment 17 errata-xmlrpc 2024-08-13 14:26:49 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions
  Red Hat Enterprise Linux 8.4 Telecommunications Update Service

Via RHSA-2024:5282 https://access.redhat.com/errata/RHSA-2024:5282

Comment 18 errata-xmlrpc 2024-08-13 14:33:59 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions
  Red Hat Enterprise Linux 8.6 Telecommunications Update Service

Via RHSA-2024:5281 https://access.redhat.com/errata/RHSA-2024:5281

Comment 20 errata-xmlrpc 2024-09-03 15:43:33 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.8 Extended Update Support

Via RHSA-2024:6206 https://access.redhat.com/errata/RHSA-2024:6206

Comment 21 errata-xmlrpc 2024-09-04 00:11:36 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Extended Update Support

Via RHSA-2024:6268 https://access.redhat.com/errata/RHSA-2024:6268

Comment 22 errata-xmlrpc 2024-09-04 00:25:34 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Extended Update Support

Via RHSA-2024:6267 https://access.redhat.com/errata/RHSA-2024:6267


Note You need to log in before you can comment on or make changes to this bug.