Skip to content

fix(pools): keep rejected names out of a single-pool bulk delete - #333

Merged
Vonng merged 1 commit into
mainfrom
claude/cross-bucket-path-traversal-delete-5e1fc2
Nov 10, 2026
Merged

Vonng merged 1 commit into
mainfrom
claude/cross-bucket-path-traversal-delete-5e1fc2

Conversation

@Vonng

@Vonng Vonng commented Nov 10, 2026

Copy link
Copy Markdown
Member

Present since the bulk delete was introduced upstream; reproduced on RELEASE.2026-11-09T00-00-00Z and RELEASE.2026-10-26T00-00-00Z. Deployments with more than one pool are not affected.

erasureServerPools.DeleteObjects checks every name with checkDelObjArgs, but on a single pool it still sent all entries to the drives, and it cleared the error of an entry that a drive reported as found. The names of an S3 DeleteObjects request come from the XML body, which the path checks of the request URL do not see, and a local drive joins the name to the bucket directory. A name with a .. segment therefore reached another bucket or the meta bucket:

  • with a version ID, a caller allowed to delete in one bucket removed a version in another bucket, including one under COMPLIANCE retention, because the Object Lock check looks at the request bucket;
  • from a versioned bucket, without a version ID and with s3:DeleteObject alone, the request wrote a delete marker on an object of another bucket or on stored system metadata such as a bucket's .metadata.bin;
  • the bulk lock was taken on the normalized name, that is on the object of the other bucket, and two aliases of one object in a request waited on each other until the lock timeout.

In a distributed single pool the remote drives refuse such a path (guardedStorage), the local drives of the node that took the request did not.

Change

Right after the check, entries that failed it keep their error and the rest of the request runs as a request of its own, before any lock, lookup or drive call. A request whose names are all valid does not enter the new code. The check is the one a single-object DELETE applies.

Behavior: on a single pool an entry whose name fails the check now returns XMinioInvalidObjectName for that entry instead of being reported as deleted, as it already did with more than one pool. The other entries of the request are deleted as before.

Tests

  • TestPoolsBulkDeleteInvalidNames: object layer, on the one bulk lock of a single node, on a pool that locks per set, and on two pools. Fails on the first two without the fix.
  • TestBulkDeleteObjectLockNameOutsideBucket: S3 request of a user who may delete in one bucket only; a version under COMPLIANCE retention, the object and the stored bucket metadata of another bucket stay. Fails without the fix.

Both names match existing race steps in go.yml, and the second one the Object Lock gate in release.yml.

🤖 Generated with Claude Code

DeleteObjects checks every name with checkDelObjArgs, but a single pool
still sent all entries to the drives and cleared the error of an entry
that a drive reported as found. Local drives join the name to the bucket
directory, so a name with a ".." segment reached another bucket or the
meta bucket. An S3 DeleteObjects caller allowed to delete in one bucket
could remove a version elsewhere, including one under Object Lock
retention, and from a versioned bucket could write a delete marker on an
object of another bucket or on stored bucket metadata. The bulk lock was
taken on the normalized name as well, that is on the other object.

Entries that fail the check now keep their error, and the rest of the
request runs as a request of its own, before any lock or lookup. A
request whose names are all valid does not enter the new code. More than
one pool already skipped such entries.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Feng Ruohang <rh@vonng.com>
@Vonng
Vonng enabled auto-merge November 10, 2026 06:27
@Vonng
Vonng merged commit 8f3657d into main Nov 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant