CVE-2021-33651
📋 TL;DR
This vulnerability in MindSpore's DepthwiseConv2D operator causes a division by zero exception when depth_multiplier is set to 0, leading to denial of service. It affects systems using vulnerable versions of MindSpore for machine learning operations. The vulnerability can crash applications performing analytical operations with this specific configuration.
💻 Affected Systems
- MindSpore
📦 What is this software?
Mindspore by Mindspore
⚠️ Risk & Real-World Impact
Worst Case
Complete application crash and denial of service for any system using the vulnerable DepthwiseConv2D operator with depth_multiplier=0, potentially disrupting machine learning inference pipelines.
Likely Case
Application crash when processing specific neural network models that use DepthwiseConv2D with depth_multiplier=0, requiring restart of affected services.
If Mitigated
No impact if depth_multiplier is never set to 0 in DepthwiseConv2D operations or if the patch is applied.
🎯 Exploit Status
Exploitation requires ability to set depth_multiplier=0 in DepthwiseConv2D operations, typically requiring some level of control over model parameters or code.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: MindSpore 1.2.0 and later
Vendor Advisory: https://gitee.com/mindspore/community/blob/master/security/security_advisory_list/mssa-2021-004_en.md
Restart Required: Yes
Instructions:
1. Upgrade MindSpore to version 1.2.0 or later. 2. Restart any applications using MindSpore. 3. Verify the fix by checking the version and testing DepthwiseConv2D operations.
🔧 Temporary Workarounds
Parameter Validation
allAdd validation to ensure depth_multiplier is never set to 0 in DepthwiseConv2D operations
# Add parameter validation in code using DepthwiseConv2D
# Ensure depth_multiplier > 0 before calling the operator
🧯 If You Can't Patch
- Implement input validation to reject depth_multiplier=0 values in DepthwiseConv2D operations
- Monitor applications for crashes related to DepthwiseConv2D operations and implement restart mechanisms
🔍 How to Verify
Check if Vulnerable:
Check MindSpore version and test DepthwiseConv2D with depth_multiplier=0 to see if it crashes
Check Version:
python -c "import mindspore; print(mindspore.__version__)"
Verify Fix Applied:
After patching, test DepthwiseConv2D with depth_multiplier=0 and verify it handles the case gracefully without crashing
📡 Detection & Monitoring
Log Indicators:
- Application crashes with division by zero errors
- Stack traces mentioning DepthwiseConv2D operations
- MindSpore error logs containing 'division by zero'
Network Indicators:
- Sudden service unavailability for ML inference endpoints
- Increased error rates in ML API responses
SIEM Query:
source="application.log" AND "division by zero" AND "DepthwiseConv2D"