Commit f832dd2
Pravali Uppugunduri
fix: Add HMAC integrity verification for Triton inference handler
- Add HMAC integrity check before pickle deserialization in TritonPythonModel.initialize()
- Replace hardcoded secret key with generate_secret_key() in _prepare_for_triton() ONNX path
- Add _hmac_signing() after ONNX export for both PyTorch and TensorFlow frameworks
- Add secret key validation in _start_triton_server() to reject None/empty keys
Fixes RCE vulnerabilities in Triton handler by aligning with HMAC verification
patterns used by TorchServe, MMS, TF Serving, and SMD handlers.1 parent 6a174f4 commit f832dd2
File tree
3 files changed
+14
-3
lines changed- sagemaker-serve/src/sagemaker/serve
- model_server/triton
3 files changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3075 | 3075 | | |
3076 | 3076 | | |
3077 | 3077 | | |
3078 | | - | |
| 3078 | + | |
3079 | 3079 | | |
3080 | 3080 | | |
3081 | 3081 | | |
3082 | 3082 | | |
3083 | 3083 | | |
| 3084 | + | |
3084 | 3085 | | |
3085 | 3086 | | |
3086 | 3087 | | |
3087 | 3088 | | |
3088 | 3089 | | |
3089 | 3090 | | |
| 3091 | + | |
3090 | 3092 | | |
3091 | 3093 | | |
3092 | 3094 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | | - | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
0 commit comments