diff --git a/cvehound/cve/CVE-2023-3812.cocci b/cvehound/cve/CVE-2023-3812.cocci new file mode 100644 index 0000000..d51c41f --- /dev/null +++ b/cvehound/cve/CVE-2023-3812.cocci @@ -0,0 +1,24 @@ +/// Files: drivers/net/tun.c +/// Fix: 363a5328f4b0517e59572118ccfb7c626d81dca9 +/// Fixes: 90e33d45940793def6f773b2d528e9f3c84ffdc7 + +virtual detect + +@err@ +identifier it; +position p; +@@ + +tun_napi_alloc_frags(..., const struct iov_iter *it) +{ + ... +* if (it->nr_segs > MAX_SKB_FRAGS + 1)@p +* return ERR_PTR(\(-EMSGSIZE\|-ENOMEM\)); + ... +} + +@script:python depends on detect@ +p << err.p; +@@ + +coccilib.report.print_report(p[0], 'ERROR: CVE-2023-3812')