CVE-2024-35902: net/rds: fix possible cp null dereference

Published May 19, 2024
·
Updated

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

Affected Software

11 affected componentsFixes available
Linux Linux kernel>=4.19.310<4.19.312
Linux Linux kernel>=5.4.272<5.7.274
Linux Linux kernel>=5.10.213<5.10.215
Linux Linux kernel>=5.15.152<5.15.154
Linux Linux kernel>=6.1.82<6.1.85
Linux Linux kernel>=6.6.22<6.6.26
Linux Linux kernel>=6.7.10<6.8.5
Linux Linux kernel=6.9-rc1
Linux Linux kernel=6.9-rc2
Debian Debian Linux=10.0
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.22-16.12.25-1

Event History

May 19, 2024
CVE Published
via MITRE·08:34 AM
Data Sourced
via MITRE·08:34 AM
Description
Data Sourced
via NVD·09:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Jul 11, 2024
Data Sourced
via Launchpad·07:46 PM
Description
Jan 3, 2025
Data Sourced
via Ubuntu·08:23 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-35902?

CVE-2024-35902 is considered a medium severity vulnerability due to its potential to cause null dereference issues in the Linux kernel.

2

How do I fix CVE-2024-35902?

To fix CVE-2024-35902, upgrade to the patched versions of the Linux kernel specified in the vulnerability report.

3

Which versions of the Linux kernel are affected by CVE-2024-35902?

CVE-2024-35902 affects specific versions of the Linux kernel between 4.19.310 and 4.19.312, as well as several ranges from 5.4.272 to 6.9-rc2.

4

What causes the null dereference in CVE-2024-35902?

The null dereference in CVE-2024-35902 is caused by the parameter 'cp' being potentially null when attempting to access 'cp->cp_conn'.

5

Is there a workaround for CVE-2024-35902?

There is no documented workaround for CVE-2024-35902, and updating to a secure kernel version is the recommended action.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203