In the Linux kernel, the following vulnerability has been resolved: net/rds: fix possible cp null dereference cp might be null, calling cp->cpconn would produce null dereference [Simon Horman adds:] Analysis: * cp is a parameter of _rdsrdmamap and is not reassigned. * The following call-sites pass a NULL cp argument to _rdsrdmamap() - rdsgetmr() - rdsgetmrfordest * Prior to the code above, the following assumes that cp may be NULL (which is indicative, but could itself be unnecessary) transprivate = rs->rstransport->getmr( sg, nents, rs, &mr->rkey, cp ? cp->cpconn : NULL, args->vec.addr, args->vec.bytes, needodp ? ODPZEROBASED : ODPNOTNEEDED); * The code modified by this patch is guarded by ISERR(transprivate), where transprivate is assigned as per the previous point in this analysis. The only implementation of getmr that I could locate is rdsibgetmr() which can return an ERRPTR if the conn (4th) argument is NULL. * ret is set to PTRERR(transprivate). rdsibgetmr can return ERRPTR(-ENODEV) if the conn (4th) argument is NULL. Thus ret may be -ENODEV in which case the code in question will execute. Conclusion: * cp may be NULL at the point where this patch adds a check; this patch does seem to address a possible bug