{"id":"CVE-2025-38240","state":"PUBLISHED","title":"drm/mediatek: dp: drm_err => dev_err in HPD path to avoid NULL ptr","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/mediatek: dp: drm_err => dev_err in HPD path to avoid NULL ptr\n\nThe function mtk_dp_wait_hpd_asserted() may be called before the\n`mtk_dp->drm_dev` pointer is assigned in mtk_dp_bridge_attach().\nSpecifically it can be called via this callpath:\n - mtk_edp_wait_hpd_asserted\n - [panel probe]\n - dp_aux_ep_probe\n\nUsing \"drm\" level prints anywhere in this callpath causes a NULL\npointer dereference. Change the error message directly in\nmtk_dp_wait_hpd_asserted() to dev_err() to avoid this. Also change the\nerror messages in mtk_dp_parse_capabilities(), which is called by\nmtk_dp_wait_hpd_asserted().\n\nWhile touching these prints, also add the error code to them to make\nfuture debugging easier.","publishedAt":"2025-04-18T07:01:32.338Z","updatedAt":"2026-05-11T21:23:56.828Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7eacba9a083be65c0f251c19380ec01147c01ebc","status":"affected","lessThan":"13ec849fd2eab808ee8eba2625df7ebea3b85edf","versionType":"git"},{"version":"7eacba9a083be65c0f251c19380ec01147c01ebc","status":"affected","lessThan":"57a9fb47551b33cde7b76d17c0072c3b394f4620","versionType":"git"},{"version":"7eacba9a083be65c0f251c19380ec01147c01ebc","status":"affected","lessThan":"2fda391ef7a701748abd7fa32232981b522c1e07","versionType":"git"},{"version":"7eacba9a083be65c0f251c19380ec01147c01ebc","status":"affected","lessThan":"149a5c38436c229950cf1020992ce65c9549bc19","versionType":"git"},{"version":"7eacba9a083be65c0f251c19380ec01147c01ebc","status":"affected","lessThan":"106a6de46cf4887d535018185ec528ce822d6d84","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/mediatek/mtk_dp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.6.87","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.23","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.11","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14.2","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/mediatek/mtk_dp.c"]}],"references":["https://git.kernel.org/stable/c/13ec849fd2eab808ee8eba2625df7ebea3b85edf","https://git.kernel.org/stable/c/57a9fb47551b33cde7b76d17c0072c3b394f4620","https://git.kernel.org/stable/c/2fda391ef7a701748abd7fa32232981b522c1e07","https://git.kernel.org/stable/c/149a5c38436c229950cf1020992ce65c9549bc19","https://git.kernel.org/stable/c/106a6de46cf4887d535018185ec528ce822d6d84"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/38xxx/CVE-2025-38240.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-38240","state":"PUBLISHED","datePublished":"2025-04-18T07:01:32.338Z","dateUpdated":"2026-05-11T21:23:56.828Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:23.996Z"},"containers":{"cna":{"title":"drm/mediatek: dp: drm_err => dev_err in HPD path to avoid NULL ptr","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/mediatek: dp: drm_err => dev_err in HPD path to avoid NULL ptr\n\nThe function mtk_dp_wait_hpd_asserted() may be called before the\n`mtk_dp->drm_dev` pointer is assigned in mtk_dp_bridge_attach().\nSpecifically it can be called via this callpath:\n - mtk_edp_wait_hpd_asserted\n - [panel probe]\n - dp_aux_ep_probe\n\nUsing \"drm\" level prints anywhere in this callpath causes a NULL\npointer dereference. Change the error message directly in\nmtk_dp_wait_hpd_asserted() to dev_err() to avoid this. Also change the\nerror messages in mtk_dp_parse_capabilities(), which is called by\nmtk_dp_wait_hpd_asserted().\n\nWhile touching these prints, also add the error code to them to make\nfuture debugging easier."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7eacba9a083be65c0f251c19380ec01147c01ebc","status":"affected","lessThan":"13ec849fd2eab808ee8eba2625df7ebea3b85edf","versionType":"git"},{"version":"7eacba9a083be65c0f251c19380ec01147c01ebc","status":"affected","lessThan":"57a9fb47551b33cde7b76d17c0072c3b394f4620","versionType":"git"},{"version":"7eacba9a083be65c0f251c19380ec01147c01ebc","status":"affected","lessThan":"2fda391ef7a701748abd7fa32232981b522c1e07","versionType":"git"},{"version":"7eacba9a083be65c0f251c19380ec01147c01ebc","status":"affected","lessThan":"149a5c38436c229950cf1020992ce65c9549bc19","versionType":"git"},{"version":"7eacba9a083be65c0f251c19380ec01147c01ebc","status":"affected","lessThan":"106a6de46cf4887d535018185ec528ce822d6d84","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/mediatek/mtk_dp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.6.87","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.23","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.11","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14.2","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/mediatek/mtk_dp.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/13ec849fd2eab808ee8eba2625df7ebea3b85edf"},{"url":"https://git.kernel.org/stable/c/57a9fb47551b33cde7b76d17c0072c3b394f4620"},{"url":"https://git.kernel.org/stable/c/2fda391ef7a701748abd7fa32232981b522c1e07"},{"url":"https://git.kernel.org/stable/c/149a5c38436c229950cf1020992ce65c9549bc19"},{"url":"https://git.kernel.org/stable/c/106a6de46cf4887d535018185ec528ce822d6d84"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:23:56.828Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.6.87"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.12.23"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.13.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.14.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.15"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}