CVE-2021-43267
Public on
Last Modified:
Description
A flaw was discovered in the cryptographic receive code in the Linux kernel's implementation of transparent interprocess communication. An attacker, with the ability to send TIPC messages to the target, can corrupt memory and escalate privileges on the target system.
Statement
This issue affects Red Hat Enterprise Linux 8 starting with the kernel that shipped with Red Hat Enterprise Linux 8.4 GA (kernel-4.18.0-305.el8). Previous Red Hat Enterprise Linux 8 kernel versions were not affected as they did not include the vulnerable functionality.
Red Hat recommends to use transport level to separate and/or secure (by both encrypting and authenticating via eg. IPSec/MACSec) the communication between nodes. This limits the exposure of this issue to semi-trusted nodes.
Mitigation
The TIPC module will NOT be automatically loaded. When required, administrative action is needed to explicitly load this module.
Loading the module can be prevented with the following instructions:
# echo "install tipc /bin/true" >> /etc/modprobe.d/disable-tipc.conf
The system will need to be restarted if the tipc module is loaded. In most circumstances, the TIPC kernel module will be unable to be unloaded while any network interfaces are active and the protocol is in use.
If the system requires this module to work correctly, this mitigation may not be suitable.
If you need further assistance, see KCS article https://access.redhat.com/solutions/41278 or contact Red Hat Global Support Services.
To mitigate the issue on systems that do need to use TIPC and do *not* deploy the TIPC protocol level encryption but rather use different ways to ensure secure communication between nodes (eg. physical network separation, IPSec/MACsec):
- BEWARE THAT THIS WILL DISABLE THE TIPC PROTOCOL LEVEL ENCRYPTION -
1) On the host, save the following in a file with the ".stp" extension:
%{
#include <linux/skbuff.h>
#define MSG_CRYPTO 14
#define SOCK_WAKEUP 14 /* pseudo user */
#define TOP_SRV 15 /* pseudo user */
struct tipc_msg {
__be32 hdr[15];
};
static inline struct tipc_msg *buf_msg(struct sk_buff *skb)
{
return (struct tipc_msg *)skb->data;
}
static inline u32 msg_word(struct tipc_msg *m, u32 pos)
{
return ntohl(m->hdr[pos]);
}
static inline void msg_set_word(struct tipc_msg *m, u32 w, u32 val)
{
m->hdr[w] = htonl(val);
}
static inline u32 msg_bits(struct tipc_msg *m, u32 w, u32 pos, u32 mask)
{
return (msg_word(m, w) >> pos) & mask;
}
static inline void msg_set_bits(struct tipc_msg *m, u32 w,
u32 pos, u32 mask, u32 val)
{
val = (val & mask) << pos;
mask = mask << pos;
m->hdr[w] &= ~htonl(mask);
m->hdr[w] |= htonl(val);
}
static inline u32 msg_user(struct tipc_msg *m)
{
return msg_bits(m, 0, 25, 0xf);
}
static inline void msg_set_user(struct tipc_msg *m, u32 n)
{
msg_set_bits(m, 0, 25, 0xf, n);
}
%}
function sanitize:long (skb:long) %{
struct sk_buff *skb;
struct tipc_msg *hdr;
#if STAP_COMPAT_VERSION >= STAP_VERSION(1,8)
skb = (struct sk_buff *) (unsigned long) STAP_ARG_skb;
#else
skb = (struct sk_buff *) (unsigned long) THIS->skb;
#endif
hdr = buf_msg(skb);
if(msg_user(hdr) == MSG_CRYPTO) {
msg_set_user(hdr, TOP_SRV); // set to invalid in this context
}
%}
probe module("tipc").function("tipc_data_input").call {
sanitize($skb);
}
2) Install the "systemtap" package and any required dependencies (such as
kernel-devel and kernel-debuginfo packages).
3) Run the "stap -g [filename-from-step-1].stp" command as root.
If the host is rebooted, the changes will be lost and the script must be
run again.
Alternatively, build the systemtap script on a development system with
"stap -g -p 4 [filename-from-step-1].stp", distribute the resulting kernel
module to all affected systems, and run "staprun -L <module>" on those.
When using this approach only systemtap-runtime package is required on the
affected systems. Please notice that the kernel version must be the same across
all systems.
Additional Information
- This content is not included.Bugzilla 2020362: kernel: Insufficient validation of user-supplied sizes for the MSG_CRYPTO message type
- Content from cwe.mitre.org is not included.CWE-20: Improper Input Validation
- FAQ: Frequently asked questions about CVE-2021-43267
- Offline Security Data data is available for integration with other systems. See Offline Security Data API to get started.
External References
Content from www.cve.org is not included.https://www.cve.org/CVERecord?id=CVE-2021-43267
Content from nvd.nist.gov is not included.https://nvd.nist.gov/vuln/detail/CVE-2021-43267
Affected Packages and Issued Red Hat Security Errata
| Products / Services | Components | State | Errata |
|---|---|---|---|
| Red Hat Enterprise Linux 6 | kernel | Not affected | |
| Red Hat Enterprise Linux 7 | kernel | Not affected | |
| Red Hat Enterprise Linux 7 | kernel-rt | Not affected | |
| Red Hat Enterprise Linux 8 | kpatch-patch | Fixed | RHSA-2021:4645 |
| Red Hat Enterprise Linux 8 | kernel-rt | Fixed | RHSA-2021:4646 |
| Red Hat Enterprise Linux 8 | kernel | Fixed | RHSA-2021:4647 |
| Red Hat Enterprise Linux 8.4 Extended Update Support | kpatch-patch | Fixed | RHSA-2021:4644 |
| Red Hat Enterprise Linux 8.4 Extended Update Support | kernel-rt | Fixed | RHSA-2021:4648 |
| Red Hat Enterprise Linux 8.4 Extended Update Support | kernel | Fixed | RHSA-2021:4650 |
| Red Hat Enterprise Linux 9 | kernel | Not affected | |
| Red Hat Virtualization 4 for Red Hat Enterprise Linux 8 | redhat-virtualization-host | Fixed | RHSA-2021:4750 |
Common Vulnerability Scoring System (CVSS) Score Details
Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authorities (CNA) source for its products and services (see Red Hat classifications ).
| CVSS v3 Score Breakdown | Red Hat | NVD |
|---|---|---|
| CVSS v3 Base Score | 8.8 | 9.8 |
| Attack Vector | Adjacent Network | Network |
| Attack Complexity | Low | Low |
| Privileges Required | None | None |
| User Interaction | None | None |
| Scope | Unchanged | Unchanged |
| Confidentiality Impact | High | High |
| Integrity Impact | High | High |
| Availability Impact | High | High |
CVSS v3 Vector
Red Hat CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat CVSS v3 Score Explanation
An attacker needs to be able to send MSG_CRYPTO messages to one of the interconnected nodes. Nodes are typically not exposed to the Internet or even local network. Infiniband and/or some sort of IPSec/MACsec level of separation is more suitable for these type of deployments. Hence we find AV:A more appropriate.
Frequently Asked Questions
Why is Red Hat's CVSS v3 score or Impact different from other vendors?
For more information, see https://access.redhat.com/solutions/762393.
My product is listed as "Under investigation" or "Affected", when will Red Hat release a fix for this vulnerability?
- "Under investigation" doesn't necessarily mean that the product is affected by this vulnerability. It only means that our Analysis Team is still working on determining whether the product is affected and how it is affected.
- "Affected" means that our Analysis Team has determined that this product is affected by this vulnerability and might release a fix to address this in the near future.
What can I do if my product is listed as "Will not fix"?
Available options depend mostly on the Impact of the vulnerability and the current Life Cycle phase of your product. Overall, you have the following options:
- Upgrade to a supported product version that includes a fix for this vulnerability (recommended).
- Apply a mitigation (if one exists).
- Open a This content is not included.support case to request a prioritization of releasing a fix for this vulnerability.
What can I do if my product is listed as "Fix deferred"?
Available options depend mostly on the Impact of the vulnerability and the current Life Cycle phase of your product. Overall, you have the following options:
- Apply a mitigation (if one exists).
- Open a This content is not included.support case to request a prioritization of releasing a fix for this vulnerability.
- Red Hat Engineering focuses on addressing high-priority issues based on their complexity or limited lifecycle support. Therefore, lower-priority issues will not receive immediate fixes.
What is a mitigation?
I have a Red Hat product but it is not in the above list, is it affected?
Why is my security scanner reporting my product as vulnerable to this vulnerability even though my product version is fixed or not affected?
Not sure what something means? Check out our Security Glossary.