Commit 92998dd
committed
Merge: CVE-2025-22104: ibmvnic: Use kernel helpers for hex dumps
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/831
JIRA: https://issues.redhat.com/browse/RHEL-89030
CVE: CVE-2025-22104
```
commit d93a6ca
Author: Nick Child <nnac123@linux.ibm.com>
Date: Thu Mar 20 16:29:51 2025 -0500
ibmvnic: Use kernel helpers for hex dumps
Previously, when the driver was printing hex dumps, the buffer was cast
to an 8 byte long and printed using string formatters. If the buffer
size was not a multiple of 8 then a read buffer overflow was possible.
Therefore, create a new ibmvnic function that loops over a buffer and
calls hex_dump_to_buffer instead.
This patch address KASAN reports like the one below:
ibmvnic 30000003 env3: Login Buffer:
ibmvnic 30000003 env3: 01000000af000000
<...>
ibmvnic 30000003 env3: 2e6d62692e736261
ibmvnic 30000003 env3: 65050003006d6f63
==================================================================
BUG: KASAN: slab-out-of-bounds in ibmvnic_login+0xacc/0xffc [ibmvnic]
Read of size 8 at addr c0000001331a9aa8 by task ip/17681
<...>
Allocated by task 17681:
<...>
ibmvnic_login+0x2f0/0xffc [ibmvnic]
ibmvnic_open+0x148/0x308 [ibmvnic]
__dev_open+0x1ac/0x304
<...>
The buggy address is located 168 bytes inside of
allocated 175-byte region [c0000001331a9a00, c0000001331a9aaf)
<...>
=================================================================
ibmvnic 30000003 env3: 000000000033766e
Fixes: 032c5e8 ("Driver for IBM System i/p VNIC protocol")
Signed-off-by: Nick Child <nnac123@linux.ibm.com>
Reviewed-by: Dave Marquardt <davemarq@linux.ibm.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250320212951.11142-1-nnac123@linux.ibm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>```
Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
---
<small>Created 2025-04-30 09:20 UTC by backporter - [KWF FAQ](https://red.ht/kernel_workflow_doc) - [Slack #team-kernel-workflow](https://redhat-internal.slack.com/archives/C04LRUPMJQ5) - [Source](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/webhook/utils/backporter.py) - [Documentation](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/docs/README.backporter.md) - [Report an issue](https://issues.redhat.com/secure/CreateIssueDetails!init.jspa?pid=12334433&issuetype=1&priority=4&summary=backporter+webhook+issue&components=kernel-workflow+/+backporter)</small>
Approved-by: Kamal Heib <kheib@redhat.com>
Approved-by: Michal Schmidt <mschmidt@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>
Merged-by: Jan Stancek <jstancek@redhat.com>1 file changed
+18
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4832 | 4832 | | |
4833 | 4833 | | |
4834 | 4834 | | |
| 4835 | + | |
| 4836 | + | |
| 4837 | + | |
| 4838 | + | |
| 4839 | + | |
| 4840 | + | |
| 4841 | + | |
| 4842 | + | |
| 4843 | + | |
| 4844 | + | |
| 4845 | + | |
| 4846 | + | |
4835 | 4847 | | |
4836 | 4848 | | |
4837 | 4849 | | |
| |||
4942 | 4954 | | |
4943 | 4955 | | |
4944 | 4956 | | |
4945 | | - | |
4946 | | - | |
4947 | | - | |
4948 | | - | |
| 4957 | + | |
| 4958 | + | |
4949 | 4959 | | |
4950 | 4960 | | |
4951 | 4961 | | |
| |||
5322 | 5332 | | |
5323 | 5333 | | |
5324 | 5334 | | |
5325 | | - | |
5326 | 5335 | | |
5327 | 5336 | | |
5328 | 5337 | | |
5329 | 5338 | | |
5330 | 5339 | | |
5331 | | - | |
5332 | | - | |
5333 | | - | |
| 5340 | + | |
| 5341 | + | |
5334 | 5342 | | |
5335 | 5343 | | |
5336 | 5344 | | |
| |||
5561 | 5569 | | |
5562 | 5570 | | |
5563 | 5571 | | |
5564 | | - | |
5565 | | - | |
5566 | | - | |
5567 | | - | |
| 5572 | + | |
| 5573 | + | |
5568 | 5574 | | |
5569 | 5575 | | |
5570 | 5576 | | |
| |||
0 commit comments