{"id":"CVE-2024-35902","aliases":["CVE-2024-35902"],"related":[],"kind":"vulnerability","state":"published","title":"net/rds: fix possible cp null dereference","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/rds: fix possible cp null dereference\n\ncp might be null, calling cp->cp_conn would produce null dereference\n\n[Simon Horman adds:]\n\nAnalysis:\n\n* cp is a parameter of __rds_rdma_map and is not reassigned.\n\n* The following call-sites pass a NULL cp argument to __rds_rdma_map()\n\n  - rds_get_mr()\n  - rds_get_mr_for_dest\n\n* Prior to the code above, the following assumes that cp may be NULL\n  (which is indicative, but could itself be unnecessary)\n\n\ttrans_private = rs->rs_transport->get_mr(\n\t\tsg, nents, rs, &mr->r_key, cp ? cp->cp_conn : NULL,\n\t\targs->vec.addr, args->vec.bytes,\n\t\tneed_odp ? ODP_ZEROBASED : ODP_NOT_NEEDED);\n\n* The code modified by this patch is guarded by IS_ERR(trans_private),\n  where trans_private is assigned as per the previous point in this analysis.\n\n  The only implementation of get_mr that I could locate is rds_ib_get_mr()\n  which can return an ERR_PTR if the conn (4th) argument is NULL.\n\n* ret is set to PTR_ERR(trans_private).\n  rds_ib_get_mr can return ERR_PTR(-ENODEV) if the conn (4th) argument is NULL.\n  Thus ret may be -ENODEV in which case the code in question will execute.\n\nConclusion:\n* cp may be NULL at the point where this patch adds a check;\n  this patch does seem to address a possible bug","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/rds: fix possible cp null dereference\n\ncp might be null, calling cp->cp_conn would produce null dereference\n\n[Simon Horman adds:]\n\nAnalysis:\n\n* cp is a parameter of __rds_rdma_map and is not reassigned.\n\n* The following call-sites pass a NULL cp argument to __rds_rdma_map()\n\n  - rds_get_mr()\n  - rds_get_mr_for_dest\n\n* Prior to the code above, the following assumes that cp may be NULL\n  (which is indicative, but could itself be unnecessary)\n\n\ttrans_private = rs->rs_transport->get_mr(\n\t\tsg, nents, rs, &mr->r_key, cp ? cp->cp_conn : NULL,\n\t\targs->vec.addr, args->vec.bytes,\n\t\tneed_odp ? ODP_ZEROBASED : ODP_NOT_NEEDED);\n\n* The code modified by this patch is guarded by IS_ERR(trans_private),\n  where trans_private is assigned as per the previous point in this analysis.\n\n  The only implementation of get_mr that I could locate is rds_ib_get_mr()\n  which can return an ERR_PTR if the conn (4th) argument is NULL.\n\n* ret is set to PTR_ERR(trans_private).\n  rds_ib_get_mr can return ERR_PTR(-ENODEV) if the conn (4th) argument is NULL.\n  Thus ret may be -ENODEV in which case the code in question will execute.\n\nConclusion:\n* cp may be NULL at the point where this patch adds a check;\n  this patch does seem to address a possible bug","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: net/rds: corrige la posible desreferencia nula de cp cp podría ser nulo, llamar a cp-&gt;cp_conn produciría una desreferencia nula [Simon Horman agrega:] Análisis: * cp es un parámetro de __rds_rdma_map y no es reasignado. * Los siguientes sitios de llamadas pasan un argumento cp NULL a __rds_rdma_map() - rds_get_mr() - rds_get_mr_for_dest * Antes del código anterior, lo siguiente supone que cp puede ser NULL (lo cual es indicativo, pero podría ser innecesario) trans_private = rs -&gt;rs_transport-&gt;get_mr( sg, nents, rs, &amp;mr-&gt;r_key, cp ? cp-&gt;cp_conn : NULL, args-&gt;vec.addr, args-&gt;vec.bytes, need_odp ? ODP_ZEROBASED : ODP_NOT_NEEDED); * El código modificado por este parche está custodiado por IS_ERR(trans_private), donde trans_private se asigna según el punto anterior de este análisis. La única implementación de get_mr que pude localizar es rds_ib_get_mr() que puede devolver un ERR_PTR si el argumento conn (cuarto) es NULL. * ret está establecido en PTR_ERR(trans_private). rds_ib_get_mr puede devolver ERR_PTR(-ENODEV) si el argumento de conexión (cuarto) es NULL. Por lo tanto, ret puede ser -ENODEV, en cuyo caso se ejecutará el código en cuestión. Conclusión: * cp puede ser NULL en el punto donde este parche agrega una verificación; este parche parece solucionar un posible error","source":"nvd"}],"published":"2024-05-19T08:34:55.692Z","modified":"2026-10-15T01:17:52.103Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"786854141057751bc08eb26f1b02e97c1631c8f4","fixed":"d275de8ea7be3a453629fddae41d4156762e814c","status":"affected"},{"type":"git","introduced":"997efea2bf3a4adb96c306b9ad6a91442237bf5b","fixed":"bcd46782e2ec3825d10c1552fcb674d491cc09f9","status":"affected"},{"type":"git","introduced":"9dfc15a10dfd44f8ff7f27488651cb5be6af83c2","fixed":"cfb786b03b03c5ff38882bee38525eb9987e4d14","status":"affected"},{"type":"git","introduced":"b562ebe21ed9adcf42242797dd6cb75beef12bf0","fixed":"d49fac38479bfdaec52b3ea274d290c47a294029","status":"affected"},{"type":"git","introduced":"998fd719e6d6468b930ac0c44552ea9ff8b07b80","fixed":"cbaac2e5488ed54833897264a5ffb2a341a9f196","status":"affected"},{"type":"git","introduced":"2b505d05280739ce31d5708da840f42df827cb85","fixed":"92309bed3c5fbe2ccd4c45056efd42edbd06162d","status":"affected"},{"type":"git","introduced":"c055fc00c07be1f0df7375ab0036cebd1106ed38","fixed":"6794090c742008c53b344b35b021d4a3093dc50a","status":"affected"},{"type":"git","introduced":"c055fc00c07be1f0df7375ab0036cebd1106ed38","fixed":"62fc3357e079a07a22465b9b6ef71bb6ea75ee4b","status":"affected"},{"type":"git","version":"907761307469adecb02461a14120e9a1812a5fb1","status":"affected"},{"type":"semver","introduced":"4.19.310","fixed":"4.19.312","status":"affected"},{"type":"semver","introduced":"5.4.272","fixed":"5.4.274","status":"affected"},{"type":"semver","introduced":"5.10.213","fixed":"5.10.215","status":"affected"},{"type":"semver","introduced":"5.15.152","fixed":"5.15.154","status":"affected"},{"type":"semver","introduced":"6.1.82","fixed":"6.1.85","status":"affected"},{"type":"semver","introduced":"6.6.22","fixed":"6.6.26","status":"affected"},{"type":"semver","introduced":"6.7.10","fixed":"6.8","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.8","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.8","status":"unaffected"},{"type":"semver","introduced":"4.19.312","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.274","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.215","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.154","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.85","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.26","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.8.5","lastAffected":"6.8.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.9","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.19.310","fixed":"4.19.312"},{"status":"affected","introduced":"5.4.272","fixed":"5.7.274"},{"status":"affected","introduced":"5.10.213","fixed":"5.10.215"},{"status":"affected","introduced":"5.15.152","fixed":"5.15.154"},{"status":"affected","introduced":"6.1.82","fixed":"6.1.85"},{"status":"affected","introduced":"6.6.22","fixed":"6.6.26"},{"status":"affected","introduced":"6.7.10","fixed":"6.8.5"},{"status":"affected","version":"6.9"},{"status":"affected","version":"6.9"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/d275de8ea7be3a453629fddae41d4156762e814c","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/bcd46782e2ec3825d10c1552fcb674d491cc09f9","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cfb786b03b03c5ff38882bee38525eb9987e4d14","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d49fac38479bfdaec52b3ea274d290c47a294029","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cbaac2e5488ed54833897264a5ffb2a341a9f196","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/92309bed3c5fbe2ccd4c45056efd42edbd06162d","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6794090c742008c53b344b35b021d4a3093dc50a","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/62fc3357e079a07a22465b9b6ef71bb6ea75ee4b","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","tags":["mailing-list","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html","tags":["mailing-list","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-265688.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-05-20T14:09:14.303Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-35902","url":"https://www.cve.org/CVERecord?id=CVE-2024-35902","licence":"CVE Terms of Use","modified":"2026-10-15T00:41:20.670Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-35902","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-35902","licence":"Public domain","modified":"2026-10-15T01:17:52.103Z"}],"updatedAt":"2026-11-25T22:58:40.593Z","epss":{"score":0.00223,"percentile":0.13771,"date":"2026-12-02T12:00:21.000Z"}}