{
  "threat_severity" : "Important",
  "public_date" : "2021-11-02T00:00:00Z",
  "bugzilla" : {
    "description" : "kernel: Insufficient validation of user-supplied sizes for the MSG_CRYPTO message type",
    "id" : "2020362",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2020362"
  },
  "cvss3" : {
    "cvss3_base_score" : "8.8",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
    "status" : "verified"
  },
  "cwe" : "CWE-20",
  "details" : [ "An issue was discovered in net/tipc/crypto.c in the Linux kernel before 5.14.16. The Transparent Inter-Process Communication (TIPC) functionality allows remote attackers to exploit insufficient validation of user-supplied sizes for the MSG_CRYPTO message type.", "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.\nRed 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.",
  "affected_release" : [ {
    "product_name" : "Red Hat Enterprise Linux 8",
    "release_date" : "2021-11-15T00:00:00Z",
    "advisory" : "RHSA-2021:4646",
    "cpe" : "cpe:/a:redhat:enterprise_linux:8::nfv",
    "package" : "kernel-rt-0:4.18.0-348.2.1.rt7.132.el8_5"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "release_date" : "2021-11-15T00:00:00Z",
    "advisory" : "RHSA-2021:4645",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8",
    "package" : "kpatch-patch"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "release_date" : "2021-11-15T00:00:00Z",
    "advisory" : "RHSA-2021:4647",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8",
    "package" : "kernel-0:4.18.0-348.2.1.el8_5"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8.4 Extended Update Support",
    "release_date" : "2021-11-15T00:00:00Z",
    "advisory" : "RHSA-2021:4648",
    "cpe" : "cpe:/a:redhat:rhel_eus:8.4::nfv",
    "package" : "kernel-rt-0:4.18.0-305.28.1.rt7.100.el8_4"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8.4 Extended Update Support",
    "release_date" : "2021-11-15T00:00:00Z",
    "advisory" : "RHSA-2021:4644",
    "cpe" : "cpe:/o:redhat:rhel_eus:8.4",
    "package" : "kpatch-patch"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8.4 Extended Update Support",
    "release_date" : "2021-11-15T00:00:00Z",
    "advisory" : "RHSA-2021:4650",
    "cpe" : "cpe:/o:redhat:rhel_eus:8.4",
    "package" : "kernel-0:4.18.0-305.28.1.el8_4"
  }, {
    "product_name" : "Red Hat Virtualization 4 for Red Hat Enterprise Linux 8",
    "release_date" : "2021-11-19T00:00:00Z",
    "advisory" : "RHSA-2021:4750",
    "cpe" : "cpe:/o:redhat:rhev_hypervisor:4.4::el8",
    "package" : "redhat-virtualization-host-0:4.4.9-202111172338_8.5"
  } ],
  "package_state" : [ {
    "product_name" : "Red Hat Enterprise Linux 6",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Not affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2021-43267\nhttps://nvd.nist.gov/vuln/detail/CVE-2021-43267" ],
  "name" : "CVE-2021-43267",
  "mitigation" : {
    "value" : "The TIPC  module will NOT be automatically loaded. When required, administrative action is needed to explicitly load this module.\nLoading the module can be prevented with the following instructions:\n# echo \"install tipc /bin/true\" >> /etc/modprobe.d/disable-tipc.conf\nThe 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.\nIf the system requires this module to work correctly, this mitigation may not be suitable.\nIf you need further assistance, see KCS article https://access.redhat.com/solutions/41278 or contact Red Hat Global Support Services.\nTo 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):\n- BEWARE THAT THIS WILL DISABLE THE TIPC PROTOCOL LEVEL ENCRYPTION - \n1) On the host, save the following in a file with the \".stp\" extension:\n%{\n#include <linux/skbuff.h>\n#define  MSG_CRYPTO           14\n#define  SOCK_WAKEUP          14       /* pseudo user */\n#define  TOP_SRV              15       /* pseudo user */\nstruct tipc_msg {\n__be32 hdr[15];\n};\nstatic inline struct tipc_msg *buf_msg(struct sk_buff *skb)\n{\nreturn (struct tipc_msg *)skb->data;\n}\nstatic inline u32 msg_word(struct tipc_msg *m, u32 pos)\n{\nreturn ntohl(m->hdr[pos]);\n}\nstatic inline void msg_set_word(struct tipc_msg *m, u32 w, u32 val)\n{\nm->hdr[w] = htonl(val);\n}\nstatic inline u32 msg_bits(struct tipc_msg *m, u32 w, u32 pos, u32 mask)\n{\nreturn (msg_word(m, w) >> pos) & mask;\n}\nstatic inline void msg_set_bits(struct tipc_msg *m, u32 w,\nu32 pos, u32 mask, u32 val)\n{\nval = (val & mask) << pos;\nmask = mask << pos;\nm->hdr[w] &= ~htonl(mask);\nm->hdr[w] |= htonl(val);\n}\nstatic inline u32 msg_user(struct tipc_msg *m)\n{\nreturn msg_bits(m, 0, 25, 0xf);\n}\nstatic inline void msg_set_user(struct tipc_msg *m, u32 n)\n{\nmsg_set_bits(m, 0, 25, 0xf, n);\n}\n%}\nfunction sanitize:long (skb:long) %{\nstruct sk_buff *skb;\nstruct tipc_msg *hdr;\n#if STAP_COMPAT_VERSION >= STAP_VERSION(1,8)\nskb = (struct sk_buff *) (unsigned long) STAP_ARG_skb;\n#else\nskb = (struct sk_buff *) (unsigned long) THIS->skb;\n#endif\nhdr = buf_msg(skb);\nif(msg_user(hdr) == MSG_CRYPTO) {\nmsg_set_user(hdr, TOP_SRV);      // set to invalid in this context\n}\n%}\nprobe module(\"tipc\").function(\"tipc_data_input\").call {\nsanitize($skb);\n}\n2) Install the \"systemtap\" package and any required dependencies (such as\nkernel-devel and kernel-debuginfo packages).\n3) Run the \"stap -g [filename-from-step-1].stp\" command as root.\nIf the host is rebooted, the changes will be lost and the script must be\nrun again.\nAlternatively, build the systemtap script on a development system with\n\"stap -g -p 4 [filename-from-step-1].stp\", distribute the resulting kernel\nmodule to all affected systems, and run \"staprun -L <module>\" on those.\nWhen using this approach only systemtap-runtime package is required on the\naffected systems. Please notice that the kernel version must be the same across\nall systems.",
    "lang" : "en:us"
  },
  "csaw" : false
}