{"id":"CVE-2021-47148","state":"PUBLISHED","title":"octeontx2-pf: fix a buffer overflow in otx2_set_rxfh_context()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nocteontx2-pf: fix a buffer overflow in otx2_set_rxfh_context()\n\nThis function is called from ethtool_set_rxfh() and \"*rss_context\"\ncomes from the user.  Add some bounds checking to prevent memory\ncorruption.","publishedAt":"2024-03-25T09:07:44.472Z","updatedAt":"2026-08-05T08:46:19.658Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"81a4362016e7d8b17031fe1aa43cdb58a7f0f163","status":"affected","lessThan":"389146bc6d2bbb20714d06624b74856320ce40f7","versionType":"git"},{"version":"81a4362016e7d8b17031fe1aa43cdb58a7f0f163","status":"affected","lessThan":"e5cc361e21648b75f935f9571d4003aaee480214","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.12","versionType":"semver"},{"version":"5.12.9","status":"unaffected","lessThanOrEqual":"5.12.*","versionType":"semver"},{"version":"5.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c"]}],"references":["https://git.kernel.org/stable/c/389146bc6d2bbb20714d06624b74856320ce40f7","https://git.kernel.org/stable/c/e5cc361e21648b75f935f9571d4003aaee480214"],"weaknesses":[],"ingestedAt":"2026-10-29T19:49:19.404Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/47xxx/CVE-2021-47148.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2021-47148","state":"PUBLISHED","datePublished":"2024-03-25T09:07:44.472Z","dateUpdated":"2026-08-05T08:46:19.658Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-03-04T18:12:48.845Z"},"containers":{"cna":{"title":"octeontx2-pf: fix a buffer overflow in otx2_set_rxfh_context()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nocteontx2-pf: fix a buffer overflow in otx2_set_rxfh_context()\n\nThis function is called from ethtool_set_rxfh() and \"*rss_context\"\ncomes from the user.  Add some bounds checking to prevent memory\ncorruption."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"81a4362016e7d8b17031fe1aa43cdb58a7f0f163","status":"affected","lessThan":"389146bc6d2bbb20714d06624b74856320ce40f7","versionType":"git"},{"version":"81a4362016e7d8b17031fe1aa43cdb58a7f0f163","status":"affected","lessThan":"e5cc361e21648b75f935f9571d4003aaee480214","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.12","versionType":"semver"},{"version":"5.12.9","status":"unaffected","lessThanOrEqual":"5.12.*","versionType":"semver"},{"version":"5.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/389146bc6d2bbb20714d06624b74856320ce40f7"},{"url":"https://git.kernel.org/stable/c/e5cc361e21648b75f935f9571d4003aaee480214"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable path is reached only through a local SIOCETHTOOL ioctl (ETHTOOL_SRSSH → ethtool_set_rxfh → otx2_set_rxfh_context); it is not triggered by received network packets or a remote service.\nAC:L - The attacker fully controls the rss_context u32 from userspace and can reliably pass an out-of-bounds value; no race or external conditions beyond the attacker's control are required to hit the overflow.\nPR:L - ETHTOOL_SRSSH requires CAP_NET_ADMIN via ns_capable(net->user_ns, CAP_NET_ADMIN), which is obtainable without real init-namespace root when an octeontx2 PF/VF is present in a userns-owned netns (common SR-IOV/container deployments), so privileges are Low under kernel CNA guidance.\nUI:N - No victim action is required; the attacker issues the ethtool ioctl directly once they have local access and the needed capability.\nS:U - The corruption occurs in the host/guest kernel driver and elevates impact only within that same kernel security authority; it is not a VM escape or IOMMU/DMA boundary bypass.\nC:H - A user-controlled index into rss_ctx[] performs an out-of-bounds pointer load and can be paired with write/free primitives, which per guidance for memory corruption is treated as enabling high confidentiality impact.\nI:H - With an OOB context the code writes attacker-influenced indir bytes through the fetched pointer and can kfree an OOB pointer on delete, giving classic out-of-bounds write / arbitrary-free integrity compromise.\nA:H - Invalid pointer dereference or free from the out-of-bounds rss_ctx access can oops/panic the kernel, so availability impact is High."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:46:19.658Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.12","versionEndExcluding":"5.12.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.12","versionEndExcluding":"5.13"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-06-26T20:36:23.128673Z","id":"CVE-2021-47148","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-26T20:36:29.271Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/389146bc6d2bbb20714d06624b74856320ce40f7","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/e5cc361e21648b75f935f9571d4003aaee480214","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-04T05:24:40.199Z"}}]}}}