Fix heap OOB read in SVMRegressor via attribute size validation (#27901)
Add ORT_ENFORCE checks in the SVMRegressor constructor to validate that
coefficients, support_vectors, and rho attribute array sizes are
consistent with the declared n_supports dimension. Without this
validation, a crafted model with undersized arrays causes the GEMM inner
loop to read past buffer boundaries.
This mirrors the existing validation already present in SVMClassifier.
- Validate rho is non-empty (accessed as rho_[0] in LINEAR mode, passed
to GEMM as bias in SVC mode)
- Validate coefficients.size() >= vector_count_ in SVC mode
- Validate feature_count_ > 0 after support_vectors division
- Add two unit tests for undersized coefficients and support_vectors
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>