]> git.kaiwu.me - nginx.git/commit
Dav: destination length validation for COPY and MOVE.
authorRoman Arutyunyan <arut@nginx.com>
Mon, 16 Mar 2026 16:13:03 +0000 (20:13 +0400)
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>
Tue, 24 Mar 2026 18:33:23 +0000 (22:33 +0400)
commita1d18284e0a173c4ef2b28425535d0f640ae0a82
tree48a4139f8c509c2f6c442af4c789b04e897f5afb
parentb23ac73b00313d159a99636c21ef71b828781018
Dav: destination length validation for COPY and MOVE.

Previously, when alias was used in a location with Dav COPY or MOVE
enabled, and the destination URI was shorter than the alias, integer
underflow could happen in ngx_http_map_uri_to_path(), which could
result in heap buffer overwrite, followed by a possible segfault.
With some implementations of memcpy(), the segfault could be avoided
and the overwrite could result in a change of the source or destination
file names to be outside of the location root.

Reported by Calif.io in collaboration with Claude and Anthropic Research.
src/http/modules/ngx_http_dav_module.c