{
  "threat_severity" : "Moderate",
  "public_date" : "2024-10-21T00:00:00Z",
  "bugzilla" : {
    "description" : "kernel: bpf: Fix a sdiv overflow issue",
    "id" : "2320517",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2320517"
  },
  "cvss3" : {
    "cvss3_base_score" : "4.4",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H",
    "status" : "verified"
  },
  "cwe" : "CWE-190",
  "details" : [ "In the Linux kernel, the following vulnerability has been resolved:\nbpf: Fix a sdiv overflow issue\nZac Ecob reported a problem where a bpf program may cause kernel crash due\nto the following error:\nOops: divide error: 0000 [#1] PREEMPT SMP KASAN PTI\nThe failure is due to the below signed divide:\nLLONG_MIN/-1 where LLONG_MIN equals to -9,223,372,036,854,775,808.\nLLONG_MIN/-1 is supposed to give a positive number 9,223,372,036,854,775,808,\nbut it is impossible since for 64-bit system, the maximum positive\nnumber is 9,223,372,036,854,775,807. On x86_64, LLONG_MIN/-1 will\ncause a kernel exception. On arm64, the result for LLONG_MIN/-1 is\nLLONG_MIN.\nFurther investigation found all the following sdiv/smod cases may trigger\nan exception when bpf program is running on x86_64 platform:\n- LLONG_MIN/-1 for 64bit operation\n- INT_MIN/-1 for 32bit operation\n- LLONG_MIN%-1 for 64bit operation\n- INT_MIN%-1 for 32bit operation\nwhere -1 can be an immediate or in a register.\nOn arm64, there are no exceptions:\n- LLONG_MIN/-1 = LLONG_MIN\n- INT_MIN/-1 = INT_MIN\n- LLONG_MIN%-1 = 0\n- INT_MIN%-1 = 0\nwhere -1 can be an immediate or in a register.\nInsn patching is needed to handle the above cases and the patched codes\nproduced results aligned with above arm64 result. The below are pseudo\ncodes to handle sdiv/smod exceptions including both divisor -1 and divisor 0\nand the divisor is stored in a register.\nsdiv:\ntmp = rX\ntmp += 1 /* [-1, 0] -> [0, 1]\nif tmp >(unsigned) 1 goto L2\nif tmp == 0 goto L1\nrY = 0\nL1:\nrY = -rY;\ngoto L3\nL2:\nrY /= rX\nL3:\nsmod:\ntmp = rX\ntmp += 1 /* [-1, 0] -> [0, 1]\nif tmp >(unsigned) 1 goto L1\nif tmp == 1 (is64 ? goto L2 : goto L3)\nrY = 0;\ngoto L2\nL1:\nrY %= rX\nL2:\ngoto L4  // only when !is64\nL3:\nwY = wY  // only when !is64\nL4:\n[1] https://lore.kernel.org/bpf/tPJLTEh7S_DxFEqAI2Ji5MBSoZVg7_G-Py2iaZpAaWtM961fFTWtsnlzwvTbzBzaUzwQAoNATXKUlt0LZOFgnDcIyKCswAnAGdUF3LBrhGQ=@protonmail.com/" ],
  "statement" : "The default Red Hat Enterprise Linux kernel prevents unprivileged users from being able to use eBPF by the kernel.unprivileged_bpf_disabled sysctl. This would require a privileged user with CAP_SYS_ADMIN or root to be able to abuse this flaw reducing its attack space.\nFor the Red Hat Enterprise Linux 9 to confirm the current state, inspect the sysctl with the command:\ncat /proc/sys/kernel/unprivileged_bpf_disabled\nThe setting of 1 would mean that unprivileged users can not use eBPF, mitigating the flaw.",
  "affected_release" : [ {
    "product_name" : "Red Hat Enterprise Linux 9",
    "release_date" : "2024-12-19T00:00:00Z",
    "advisory" : "RHSA-2024:11486",
    "cpe" : "cpe:/a:redhat:enterprise_linux:9",
    "package" : "kernel-0:5.14.0-503.19.1.el9_5"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "release_date" : "2024-12-19T00:00:00Z",
    "advisory" : "RHSA-2024:11486",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9",
    "package" : "kernel-0:5.14.0-503.19.1.el9_5"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9.4 Extended Update Support",
    "release_date" : "2024-12-11T00:00:00Z",
    "advisory" : "RHSA-2024:10942",
    "cpe" : "cpe:/a:redhat:rhel_eus:9.4",
    "package" : "kernel-0:5.14.0-427.48.1.el9_4"
  } ],
  "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" : "Out of support scope",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Out of support scope",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Will not fix",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Will not fix",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2024-49888\nhttps://nvd.nist.gov/vuln/detail/CVE-2024-49888\nhttps://lore.kernel.org/linux-cve-announce/2024102117-CVE-2024-49888-027c@gregkh/T" ],
  "name" : "CVE-2024-49888",
  "csaw" : false
}