Skip to content

fix: [stable-8.0.10][OCISDEV-1675] fix a nil pointer panic in the sharecache Remove - #13472

Closed
2403905 wants to merge 4 commits into
stable-8.0.10-fixfrom
fix/stable-8.0.10-OCISDEV-1675
Closed

2403905 wants to merge 4 commits into
stable-8.0.10-fixfrom
fix/stable-8.0.10-OCISDEV-1675

Conversation

@2403905

@2403905 2403905 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

This pull request bumps reva to d74730112. This is the merge commit of owncloud/reva#814.

sharecache.Cache.Remove in reva (pkg/share/manager/jsoncs3/sharecache/sharecache.go) read the share IDs of a space with no nil check. When the user had no cache entry for the space of the share, Remove panicked. The panic occurred in an errgroup goroutine, so it stopped the process. The panic occurred on school-0255 and school-0265 during the cleanup of orphaned shares (OCSRE-2548). Unshare and all other removal paths were affected too.

The reva fix skips the delete when the space entry is absent. It still persists the cache, so a stale cache gets an etag conflict, a resync and a retry.

The reva pull request also fixes two related nil checks in pkg/share/manager/jsoncs3/providercache/providercache.go:

  • PurgeSpace stored a nil share map. A later Add to the same space panicked.
  • Remove checked the wrong ok value after it loaded the space.

Changes

  • go.mod, go.sum, vendor/modules.txt: reva bb724be57312 → d74730112e09.
  • vendor/github.com/owncloud/reva/v2/pkg/share/manager/jsoncs3/sharecache/sharecache.go: the nil check in Remove.
  • vendor/github.com/owncloud/reva/v2/pkg/share/manager/jsoncs3/providercache/providercache.go: the fixes in PurgeSpace and Remove.
  • changelog/unreleased/fix-sharecache-remove-nil-panic.md: the changelog entry.

Not in this pull request

The fix for the pkg/rgrpc panic when a grpc server stops before it serves is in owncloud/reva#815. When owncloud/reva#815 is merged, a separate ocis pull request must bump reva.

Tests

  • The reva pull request adds 4 regression tests. On the old code, all 4 panic. With the fix, all pkg/share/manager/jsoncs3/... packages pass with -race.
  • go build -mod=vendor passes for ./ocis/cmd/ocis/, ./services/sharing/..., ./services/storage-shares/... and ./services/gateway/....

Related

🤖 Generated with Claude Code

…ic in the sharecache Remove

Bump reva to the head of owncloud/reva#814. The reva fix adds a nil
check in sharecache.Cache.Remove. Without it, a removal of a share in a
space that the user has no cache entry for stops the process.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kw-security

kw-security commented Nov 13, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

2403905 and others added 3 commits November 13, 2026 13:07
… providercache

Bump reva to the head of owncloud/reva#814. The new reva commit fixes
a nil map in providercache.Cache.PurgeSpace and a wrong ok check in
providercache.Cache.Remove.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s before it serves

Bump reva to the head of owncloud/reva#814. The new reva commit lets
Stop and GracefulStop of pkg/rgrpc work before the grpc server exists.
Before, a SIGTERM during a slow service start crashed the sharing
service with a nil pointer panic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ncloud/reva#814

owncloud/reva#814 is merged as d74730112. Point reva to that commit.
The merge does not contain the rgrpc stop-before-start fix. That fix
is in owncloud/reva#815. Thus this commit also removes the vendored
rgrpc change and its changelog entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@kobergj kobergj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed asap

@2403905 2403905 closed this Nov 16, 2026
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.

3 participants