{
   "containers": {
      "cna": {
         "providerMetadata": {
            "orgId": "f4215fc3-5b6b-47ff-a258-f7189bd81038"
         },
         "descriptions": [
            {
               "lang": "en",
               "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nlibbpf: Handle size overflow for ringbuf mmap\n\nThe maximum size of ringbuf is 2GB on x86-64 host, so 2 * max_entries\nwill overflow u32 when mapping producer page and data pages. Only\ncasting max_entries to size_t is not enough, because for 32-bits\napplication on 64-bits kernel the size of read-only mmap region\nalso could overflow size_t.\n\nSo fixing it by casting the size of read-only mmap region into a __u64\nand checking whether or not there will be overflow during mmap."
            }
         ],
         "affected": [
            {
               "product": "Linux",
               "vendor": "Linux",
               "defaultStatus": "unaffected",
               "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               "programFiles": [
                  "tools/lib/bpf/ringbuf.c"
               ],
               "versions": [
                  {
                     "version": "bf99c936f947",
                     "lessThan": "8a549ab67245",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "bf99c936f947",
                     "lessThan": "0140e079a420",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "bf99c936f947",
                     "lessThan": "535a25ab4f9a",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "bf99c936f947",
                     "lessThan": "927cbb478adf",
                     "status": "affected",
                     "versionType": "git"
                  }
               ]
            },
            {
               "product": "Linux",
               "vendor": "Linux",
               "defaultStatus": "affected",
               "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               "programFiles": [
                  "tools/lib/bpf/ringbuf.c"
               ],
               "versions": [
                  {
                     "version": "5.8",
                     "status": "affected"
                  },
                  {
                     "version": "0",
                     "lessThan": "5.8",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.10.158",
                     "lessThanOrEqual": "5.10.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "5.15.82",
                     "lessThanOrEqual": "5.15.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.0.12",
                     "lessThanOrEqual": "6.0.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.1",
                     "lessThanOrEqual": "*",
                     "status": "unaffected",
                     "versionType": "original_commit_for_fix"
                  }
               ]
            }
         ],
         "references": [
            {
               "url": "https://git.kernel.org/stable/c/8a549ab6724520aa3c07f47e0eba820293551490"
            },
            {
               "url": "https://git.kernel.org/stable/c/0140e079a42064680394fff1199a7b5483688dec"
            },
            {
               "url": "https://git.kernel.org/stable/c/535a25ab4f9a45f74ba38ab71de95e97474922ed"
            },
            {
               "url": "https://git.kernel.org/stable/c/927cbb478adf917e0a142b94baa37f06279cc466"
            }
         ],
         "title": "libbpf: Handle size overflow for ringbuf mmap",
         "x_generator": {
            "engine": "bippy-c9c4e1df01b2"
         }
      }
   },
   "cveMetadata": {
      "assignerOrgId": "f4215fc3-5b6b-47ff-a258-f7189bd81038",
      "cveID": "CVE-2022-49030",
      "requesterUserId": "gregkh@kernel.org",
      "serial": "1",
      "state": "PUBLISHED"
   },
   "dataType": "CVE_RECORD",
   "dataVersion": "5.0"
}
