Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Efremov <efremov@linux.com>
  • Loading branch information
evdenis committed Sep 8, 2023
1 parent 931d379 commit f8feaa9
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions cvehound/cve/CVE-2022-3106.cocci
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/// Files: drivers/net/ethernet/sfc/ef100_nic.c
/// Fix: 407ecd1bd726f240123f704620d46e285ff30dd9
/// Fixes: b593b6f1b4921700c00394d35e098259e3d04913

virtual detect

@err@
identifier efx, mc_stats;
typedef __le64;
position p;
@@

ef100_update_stats(struct efx_nic *efx,...)
{
...
* __le64 *mc_stats = kmalloc(array_size(efx->num_mac_stats, sizeof(__le64)), GFP_ATOMIC);
... when != if (!mc_stats) return 0;
* efx_nic_copy_stats(efx, mc_stats@p);
...
}

@script:python depends on detect@
p << err.p;
@@
coccilib.report.print_report(p[0], 'ERROR: CVE-2022-3106')

0 comments on commit f8feaa9

Please sign in to comment.