Overview
About vulnerability
In the Linux kernel, the following vulnerability has been resolved:
vlan: enforce underlying device type
Currently, VLAN devices can be created on top of non-ethernet devices.
Besides the fact that it doesn’t make much sense, this also causes a bug which leaks the address of a kernel function to usermode.
When creating a VLAN device, we initialize GARP (garp_init_applicant) and MRP (mrp_init_applicant) for the underlying device.
As part of the initialization process, we add the multicast address of each applicant to the underlying device, by calling dev_mc_add.
__dev_mc_add uses dev->addr_len to determine the length of the new multicast address.
This causes an out-of-bounds read if dev->addr_len is greater than 6, since the multicast addresses provided by GARP and MRP are only 6 bytes long.
This behaviour can be reproduced using the following commands:
ip tunnel add gretest mode ip6gre local ::1 remote ::2 dev lo ip l set up dev gretest ip link add link gretest name vlantest type vlan id 100
Then, the following command will display the address of garp_pdu_rcv:
ip maddr show | grep 01:80:c2:00:00:21
Fix the bug by enforcing the type of the underlying device during VLAN device initialization.
Details
- Affected product:
- AlmaLinux 9.2 ESU , Amazon Linux 2 ELS , CentOS 7 ELS , CentOS 8.4 ELS , CentOS 8.5 ELS , CentOS Stream 8 ELS , CloudLinux 7 ELS , Debian 10 ELS , Oracle Linux 7 ELS , RHEL 7 ELS , TuxCare 9.6 ESU , TuxCare 9.8 ESU , Ubuntu 16.04 ELS , Ubuntu 18.04 ELS , Ubuntu 20.04 ELS
- Affected packages:
- linux @ 4.15.0 (+16 more)
Fixes
KernelCare state
Live-patch status from KernelCare for each operating system.
| Operating system | Status | Covered kernels |
|---|---|---|
| AlmaLinux 9 | Released |
55 kernels
|
| Amazon Linux 2 | Released |
103 kernels
|
| Amazon Linux 2023 | Planned | — |
| CentOS 7 ELS | Released |
16 kernels
|
| Debian 11 | Released |
34 kernels
|
| Debian 11 cloud | Released |
14 kernels
|
| Debian 12 | Released |
23 kernels
|
| Oracle Linux 9 | Released |
61 kernels
|
| Proxmox VE 7 5.15 | Released |
47 kernels
|
| RHEL 9 | Released |
55 kernels
|
| Rocky Linux 9 | Released |
51 kernels
|
| Ubuntu 18.04 AWS Focal | Released |
56 kernels
|
| Ubuntu 18.04 HWE Focal | Released |
69 kernels
|
| Ubuntu 20.04 | Released |
126 kernels
|
| Ubuntu 20.04 AWS | Released |
108 kernels
|
| Ubuntu 20.04 Azure | Released |
99 kernels
|
| Ubuntu 20.04 GCP | Ready For Release | — |
| Ubuntu 20.04 HWE AWS | Released |
56 kernels
|
| Ubuntu 20.04 HWE Azure | Released |
39 kernels
|
| Ubuntu 22.04 | Released |
73 kernels
|
| Ubuntu 22.04 AWS | Released |
64 kernels
|
| Ubuntu 22.04 Azure | Released |
60 kernels
|
| Ubuntu 24.04 | Released |
30 kernels
|
| Ubuntu 24.04 AWS | Planned | — |