viable/strict/1788240474: Fix stack buffer overflow in libshm Unix socket path handling (#195183)
- PyTorch 近 90 天出现 354 次
- PyTorch 近 90 天第 351 次发版
- 上一次:同一天稍早 · trunk/1c18e345be116271b20aec52297a7f42f4607c35
发生了什么
Summary Fixes #195182 Replace unbounded strcpy() in Socket::prepare_address() with a length check and bounded copy into sockaddr_un.sun_path . Changes Zero-initialize sockaddr_un with {} Reject paths >= sizeof(sun_path) via TORCH_CHECK Use strncpy with explicit null termination Test plan Default torch_shm_manager startup still works (typical /tmp/torch-shm-dir-*/manager.sock paths) Oversized path triggers clean TORC…
摘要按规则整理自下方来源原文