CVE-2021-47413: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: usb: chipidea: ci_hdrc_imx: Also search for 'phys' phandle When passing 'phys' in the devicetree to describe the USB PHY phandle (which is the recommended way according to Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt) the following NULL pointer dereference is observed on i.MX7 and i.MX8MM: [ 1.489344] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000098 [ 1.498170] Mem abort info: [ 1.500966] ESR = 0x96000044 [ 1.504030] EC = 0x25: DABT (current EL), IL = 32 bits [ 1.509356] SET = 0, FnV = 0 [ 1.512416] EA = 0, S1PTW = 0 [ 1.515569] FSC = 0x04: level 0 translation fault [ 1.520458] Data abort info: [ 1.523349] ISV = 0, ISS = 0x00000044 [ 1.527196] CM = 0, WnR = 1 [ 1.530176] [0000000000000098] user address but active_mm is swapper [ 1.536544] Internal error: Oops: 96000044 [#1] PREEMPT SMP [ 1.542125] Modules linked in: [ 1.545190] CPU: 3 PID: 7 Comm: kworker/u8:0 Not tainted 5.14.0-dirty #3 [ 1.551901] Hardware name: Kontron i.MX8MM N801X S (DT) [ 1.557133] Workqueue: events_unbound deferred_probe_work_func [ 1.562984] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--) [ 1.568998] pc : imx7d_charger_detection+0x3f0/0x510 [ 1.573973] lr : imx7d_charger_detection+0x22c/0x510 This happens because the charger functions check for the phy presence inside the imx_usbmisc_data structure (data->usb_phy), but the chipidea core populates the usb_phy passed via 'phys' inside 'struct ci_hdrc' (ci->usb_phy) instead. This causes the NULL pointer dereference inside imx7d_charger_detection(). Fix it by also searching for 'phys' in case 'fsl,usbphy' is not found. Tested on a imx7s-warp board.
AI Analysis
Technical Summary
CVE-2021-47413 is a vulnerability in the Linux kernel affecting the USB controller driver for the ChipIdea hardware (ci_hdrc_imx), specifically on i.MX7 and i.MX8MM platforms. The issue arises when the device tree passes the 'phys' phandle to describe the USB PHY, which is the recommended method according to Linux device tree documentation. The vulnerability manifests as a NULL pointer dereference during kernel initialization, triggered by the charger detection function imx7d_charger_detection(). This function incorrectly checks for the USB PHY presence inside the imx_usbmisc_data structure (data->usb_phy), but the ChipIdea core driver actually stores the USB PHY pointer inside the ci_hdrc structure (ci->usb_phy). Because of this mismatch, the function attempts to dereference a NULL pointer, causing a kernel oops and crash. The fault occurs early during system boot, as evidenced by the kernel log messages showing a memory abort at a low virtual address. The root cause is the driver not searching for the 'phys' property when 'fsl,usbphy' is absent, leading to an uninitialized pointer. The fix involves modifying the driver to also search for the 'phys' phandle if 'fsl,usbphy' is not found, ensuring the USB PHY pointer is correctly populated. This vulnerability affects Linux kernel versions including 5.14.0 and is confirmed on hardware such as the Kontron i.MX8MM N801X S and imx7s-warp boards. No known exploits are reported in the wild, and no CVSS score has been assigned yet.
Potential Impact
For European organizations using embedded systems or industrial devices based on i.MX7 or i.MX8MM processors running vulnerable Linux kernels, this vulnerability can cause system instability or denial of service due to kernel crashes during boot or runtime. This is particularly critical for sectors relying on embedded Linux platforms such as manufacturing, automotive, telecommunications, and IoT deployments. A kernel NULL pointer dereference leads to a system panic or reboot, disrupting availability of critical services or devices. While this vulnerability does not directly allow privilege escalation or data leakage, the resulting denial of service can impact operational continuity. Systems that rely on USB PHY initialization for charger detection or USB connectivity may fail to boot or operate correctly. The impact is heightened in environments where physical access is limited and remote recovery is difficult. Since exploitation requires specific hardware platforms and device tree configurations, the threat is more targeted rather than widespread. However, organizations deploying custom Linux kernels on i.MX7/i.MX8MM hardware should prioritize patching to maintain system reliability.
Mitigation Recommendations
1. Apply the official Linux kernel patches that address CVE-2021-47413, ensuring the ci_hdrc_imx driver correctly handles the 'phys' phandle in the device tree. 2. Update embedded Linux distributions or vendor-provided kernel versions to include this fix, especially for devices based on i.MX7 and i.MX8MM processors. 3. Review device tree configurations to confirm that USB PHY phandles are correctly specified and consistent with the patched driver expectations. 4. Implement robust testing of device boot sequences after kernel updates to detect any regressions or initialization failures. 5. For critical industrial or embedded deployments, consider fallback mechanisms or watchdog timers to recover from kernel panics caused by this issue. 6. Monitor vendor advisories and Linux kernel mailing lists for any follow-up patches or related vulnerabilities. 7. If immediate patching is not feasible, restrict access to vulnerable devices and limit exposure to untrusted USB devices or configurations that could trigger the fault.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Poland, Sweden, Finland
CVE-2021-47413: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: usb: chipidea: ci_hdrc_imx: Also search for 'phys' phandle When passing 'phys' in the devicetree to describe the USB PHY phandle (which is the recommended way according to Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt) the following NULL pointer dereference is observed on i.MX7 and i.MX8MM: [ 1.489344] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000098 [ 1.498170] Mem abort info: [ 1.500966] ESR = 0x96000044 [ 1.504030] EC = 0x25: DABT (current EL), IL = 32 bits [ 1.509356] SET = 0, FnV = 0 [ 1.512416] EA = 0, S1PTW = 0 [ 1.515569] FSC = 0x04: level 0 translation fault [ 1.520458] Data abort info: [ 1.523349] ISV = 0, ISS = 0x00000044 [ 1.527196] CM = 0, WnR = 1 [ 1.530176] [0000000000000098] user address but active_mm is swapper [ 1.536544] Internal error: Oops: 96000044 [#1] PREEMPT SMP [ 1.542125] Modules linked in: [ 1.545190] CPU: 3 PID: 7 Comm: kworker/u8:0 Not tainted 5.14.0-dirty #3 [ 1.551901] Hardware name: Kontron i.MX8MM N801X S (DT) [ 1.557133] Workqueue: events_unbound deferred_probe_work_func [ 1.562984] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--) [ 1.568998] pc : imx7d_charger_detection+0x3f0/0x510 [ 1.573973] lr : imx7d_charger_detection+0x22c/0x510 This happens because the charger functions check for the phy presence inside the imx_usbmisc_data structure (data->usb_phy), but the chipidea core populates the usb_phy passed via 'phys' inside 'struct ci_hdrc' (ci->usb_phy) instead. This causes the NULL pointer dereference inside imx7d_charger_detection(). Fix it by also searching for 'phys' in case 'fsl,usbphy' is not found. Tested on a imx7s-warp board.
AI-Powered Analysis
Technical Analysis
CVE-2021-47413 is a vulnerability in the Linux kernel affecting the USB controller driver for the ChipIdea hardware (ci_hdrc_imx), specifically on i.MX7 and i.MX8MM platforms. The issue arises when the device tree passes the 'phys' phandle to describe the USB PHY, which is the recommended method according to Linux device tree documentation. The vulnerability manifests as a NULL pointer dereference during kernel initialization, triggered by the charger detection function imx7d_charger_detection(). This function incorrectly checks for the USB PHY presence inside the imx_usbmisc_data structure (data->usb_phy), but the ChipIdea core driver actually stores the USB PHY pointer inside the ci_hdrc structure (ci->usb_phy). Because of this mismatch, the function attempts to dereference a NULL pointer, causing a kernel oops and crash. The fault occurs early during system boot, as evidenced by the kernel log messages showing a memory abort at a low virtual address. The root cause is the driver not searching for the 'phys' property when 'fsl,usbphy' is absent, leading to an uninitialized pointer. The fix involves modifying the driver to also search for the 'phys' phandle if 'fsl,usbphy' is not found, ensuring the USB PHY pointer is correctly populated. This vulnerability affects Linux kernel versions including 5.14.0 and is confirmed on hardware such as the Kontron i.MX8MM N801X S and imx7s-warp boards. No known exploits are reported in the wild, and no CVSS score has been assigned yet.
Potential Impact
For European organizations using embedded systems or industrial devices based on i.MX7 or i.MX8MM processors running vulnerable Linux kernels, this vulnerability can cause system instability or denial of service due to kernel crashes during boot or runtime. This is particularly critical for sectors relying on embedded Linux platforms such as manufacturing, automotive, telecommunications, and IoT deployments. A kernel NULL pointer dereference leads to a system panic or reboot, disrupting availability of critical services or devices. While this vulnerability does not directly allow privilege escalation or data leakage, the resulting denial of service can impact operational continuity. Systems that rely on USB PHY initialization for charger detection or USB connectivity may fail to boot or operate correctly. The impact is heightened in environments where physical access is limited and remote recovery is difficult. Since exploitation requires specific hardware platforms and device tree configurations, the threat is more targeted rather than widespread. However, organizations deploying custom Linux kernels on i.MX7/i.MX8MM hardware should prioritize patching to maintain system reliability.
Mitigation Recommendations
1. Apply the official Linux kernel patches that address CVE-2021-47413, ensuring the ci_hdrc_imx driver correctly handles the 'phys' phandle in the device tree. 2. Update embedded Linux distributions or vendor-provided kernel versions to include this fix, especially for devices based on i.MX7 and i.MX8MM processors. 3. Review device tree configurations to confirm that USB PHY phandles are correctly specified and consistent with the patched driver expectations. 4. Implement robust testing of device boot sequences after kernel updates to detect any regressions or initialization failures. 5. For critical industrial or embedded deployments, consider fallback mechanisms or watchdog timers to recover from kernel panics caused by this issue. 6. Monitor vendor advisories and Linux kernel mailing lists for any follow-up patches or related vulnerabilities. 7. If immediate patching is not feasible, restrict access to vulnerable devices and limit exposure to untrusted USB devices or configurations that could trigger the fault.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-05-21T14:58:30.818Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9833c4522896dcbe9087
Added to database: 5/21/2025, 9:09:07 AM
Last enriched: 6/30/2025, 12:40:23 PM
Last updated: 8/17/2025, 8:22:07 AM
Views: 16
Related Threats
CVE-2025-53948: CWE-415 Double Free in Santesoft Sante PACS Server
HighCVE-2025-52584: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-46269: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-54862: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumCVE-2025-54759: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.