Created attachment 224932 [details] change *p_ent to **p_ent in ecore_spq_add_entry() Bug File: sys/dev/qlnx/qlnxe/ecore_spq.c In function ecore_spq_post, p_ent could be freed via ecore_spq_add_entry(..,p_ent,..)->OSAL_FREE(..,p_ent). At the spq_post_fail brach, the freed p_ent is still used by __ecore_spq_return_entry(p_hwfn, p_ent), which is a use after free bug. The root of this uaf bug is that, p_ent is freed in function ecore_spq_add_entry() but failed to be reset to p_en2 by "p_ent = p_en2;". The p_ent passed to ecore_spq_add_entry() should be **p_ent, instead of *p_ent. My patch fixs that error by a new variable p_en1.
David, could you please take a look?
https://reviews.freebsd.org/D30612
Keyword: patch or patch-ready – in lieu of summary line prefix: [patch] * bulk change for the keyword * summary lines may be edited manually (not in bulk). Keyword descriptions and search interface: <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>