A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 09:45 UTC
[BugFix] [Vul] Add missing `usedforsecurity=False` in MD5 hashing to enable FIPS (#18319)
Signed-off-by: cascade812 <cascade812@outlook.com> Signed-off-by: shaoyuyoung <shaoyuyoung@gmail.com> Co-authored-by: cascade <cascade812@outlook.com>
Shaoyu Yang committed
May 19, 2025 at 16:31 UTC
d637b960994119907b41c82d79f5a71c96dd419b
1 file changed
+6
-6
vllm/model_executor/model_loader/neuronx_distributed.py
+6
-6
@@ -143,8 +143,8 @@ class NeuronCausalLM(nn.Module):
143
config = neuronx_model_cls.get_config_cls()(
144
neuron_config,
145
load_config=load_pretrained_config(model_name_or_path))
146
- hashed_config = hashlib.md5(
147
- config.to_json_string().encode('utf-8')).hexdigest()
146
+ hashed_config = hashlib.md5(config.to_json_string().encode('utf-8'),
147
+ usedforsecurity=False).hexdigest()
148
if os.getenv("NEURON_COMPILED_ARTIFACTS") is not None:
149
compiled_model_path = os.getenv("NEURON_COMPILED_ARTIFACTS")
150
elif os.path.exists(model_name_or_path):
@@ -263,8 +263,8 @@ class NeuronMllamaForCausalLM(nn.Module):
263
config = neuronx_model_cls.get_config_cls()(
264
neuron_config,
265
load_config=load_pretrained_config(model_name_or_path))
266
- hashed_config = hashlib.md5(
267
- config.to_json_string().encode('utf-8')).hexdigest()
266
+ hashed_config = hashlib.md5(config.to_json_string().encode('utf-8'),
267
+ usedforsecurity=False).hexdigest()
268
if os.getenv("NEURON_COMPILED_ARTIFACTS") is not None:
269
compiled_model_path = os.getenv("NEURON_COMPILED_ARTIFACTS")
270
elif os.path.exists(model_name_or_path):
@@ -426,8 +426,8 @@ class NeuronSpeculationCausalLM(nn.Module):
426
config.fused_spec_config = fused_spec_config
427
self.config.neuron_config = neuron_config
428
429
- hashed_config = hashlib.md5(
430
- config.to_json_string().encode('utf-8')).hexdigest()
429
+ hashed_config = hashlib.md5(config.to_json_string().encode('utf-8'),
430
+ usedforsecurity=False).hexdigest()
431
if os.getenv("NEURON_COMPILED_ARTIFACTS") is not None:
432
compiled_model_path = os.getenv("NEURON_COMPILED_ARTIFACTS")
433
elif os.path.exists(model_name_or_path):