Files
cloudpods/pkg
4ba761aa29 fix(hostimage): harden nbd export against command injection (#25530)
The nbd export endpoints interpolated the request disk_id into
shell commands (sh -c with the joined qemu-nbd command line, and
ps|grep for the process check), so a crafted disk_id could execute
arbitrary commands as root on the host image service.

- Require the disk_id to be a plain UUID in both export and close
  endpoints
- Run qemu-nbd with argv instead of sh -c
- Check the export process via its pid file and kill -0 instead of
  shell pipelines
- Add unit tests for the validation and the process check

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-03 23:47:54 +08:00
..
2026-08-20 17:30:16 +08:00
2026-08-20 17:30:16 +08:00
2026-08-20 17:30:16 +08:00
2026-08-20 17:30:16 +08:00
2026-06-09 18:54:54 +08:00
2024-01-02 16:49:18 +08:00
2026-08-20 17:30:16 +08:00
2026-08-20 17:30:16 +08:00
2026-08-20 17:30:16 +08:00