]> 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 14:45:25 +0000 (18:45 +0400)
commit9739e755b8dddba82e65ca2a08d079f4c9826b75
tree663b0068362ccda8747bcbae6d8728072b3b8ea1
parent3568812cf98dfd7661cd7516ecf9b398c134ab3c
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