Commit 620fd7d
committed
Merge: CVE-2025-22104: ibmvnic: Use kernel helpers for hex dumps
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/6815
JIRA: https://issues.redhat.com/browse/RHEL-89020
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:23 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: Augusto Caringi <acaringi@redhat.com>1 file changed
+18
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4684 | 4684 | | |
4685 | 4685 | | |
4686 | 4686 | | |
| 4687 | + | |
| 4688 | + | |
| 4689 | + | |
| 4690 | + | |
| 4691 | + | |
| 4692 | + | |
| 4693 | + | |
| 4694 | + | |
| 4695 | + | |
| 4696 | + | |
| 4697 | + | |
| 4698 | + | |
4687 | 4699 | | |
4688 | 4700 | | |
4689 | 4701 | | |
| |||
4794 | 4806 | | |
4795 | 4807 | | |
4796 | 4808 | | |
4797 | | - | |
4798 | | - | |
4799 | | - | |
4800 | | - | |
| 4809 | + | |
| 4810 | + | |
4801 | 4811 | | |
4802 | 4812 | | |
4803 | 4813 | | |
| |||
5173 | 5183 | | |
5174 | 5184 | | |
5175 | 5185 | | |
5176 | | - | |
5177 | 5186 | | |
5178 | 5187 | | |
5179 | 5188 | | |
5180 | 5189 | | |
5181 | 5190 | | |
5182 | | - | |
5183 | | - | |
5184 | | - | |
| 5191 | + | |
| 5192 | + | |
5185 | 5193 | | |
5186 | 5194 | | |
5187 | 5195 | | |
| |||
5412 | 5420 | | |
5413 | 5421 | | |
5414 | 5422 | | |
5415 | | - | |
5416 | | - | |
5417 | | - | |
5418 | | - | |
| 5423 | + | |
| 5424 | + | |
5419 | 5425 | | |
5420 | 5426 | | |
5421 | 5427 | | |
| |||
0 commit comments