Skip to content

WIP: remove master key from core dump#359

Open
salieri11 wants to merge 84 commits intochrisphoffman:wip-fscryptfrom
salieri11:wip-igolikov-fscrypt-69205
Open

WIP: remove master key from core dump#359
salieri11 wants to merge 84 commits intochrisphoffman:wip-fscryptfrom
salieri11:wip-igolikov-fscrypt-69205

Conversation

@salieri11
Copy link

@salieri11 salieri11 commented Feb 6, 2025

This PR removes the master key when the user space encryption is used with CEPH FS.

Fixes https://tracker.ceph.com/issues/69205

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@github-actions github-actions bot added the cephfs label Feb 6, 2025
Copy link
Owner

@chrisphoffman chrisphoffman left a comment

Choose a reason for hiding this comment

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

I wanted to verify with pointers and padding that key is preserved. I'm able to write on ceph-fuse and read correctly on kernel client.

Can you share your steps to verify the key was excluded in core dump? Is it possible you can include it as a test?

@salieri11
Copy link
Author

I wanted to verify with pointers and padding that key is preserved. I'm able to write on ceph-fuse and read correctly on kernel client.

Can you share your steps to verify the key was excluded in core dump? Is it possible you can include it as a test?

Well for manual testing I can use gcore to generate core dump, or to kill the process with SIGABRT, which will trigger core dump generation.
Then I can use gdb to find strings in the coredump (since the key is char* and its just a text) I think I will be able to find it. And if they key is excluded from the dump, we should not be able to find this string

@chrisphoffman chrisphoffman force-pushed the wip-fscrypt branch 3 times, most recently from 83c27c9 to a827329 Compare March 12, 2025 21:50
@chrisphoffman chrisphoffman force-pushed the wip-fscrypt branch 2 times, most recently from f330840 to 53006c4 Compare April 7, 2025 13:53
yehudasa and others added 20 commits April 7, 2025 16:22
Signed-off-by: Yehuda Sadeh <ysadehwe@ibm.com>
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
in dir when unlocked. Client should not be able to read/write the encrypted payload.

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
it put_cap_ref and it didn't happen. Issue with bool need_read.

Fixes: https://tracker.ceph.com/issues/64307
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
When creating symlink, ensure symlink_plain is set in fscrypt and
non-fscrypt cases.

Fixes: https://tracker.ceph.com/issues/64691
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Fix the logic in need read start/end. We need to make sure that a
whole block is read when a rmw is issued, regardless if it starts
at offset 0 or not. Change size that may be read from where offset
starts to the whole fscrypt block.

Fixes: https://tracker.ceph.com/issues/64819
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
During a lookup of fscrypt enabled symlink, use target fscrypt
info. This must be used because enc key for each file is derived
from master_key+nonce.

Fixes: https://tracker.ceph.com/issues/65615
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Fscrypt rmw fails when end of a write lines up with end of
a block or end of the file.

Fixes: https://tracker.ceph.com/issues/65745
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Only append pbl to bl if encrypted case.

Fixes: https://tracker.ceph.com/issues/65964
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Fixes: https://tracker.ceph.com/issues/64159
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
chrisphoffman and others added 4 commits May 7, 2025 09:50
Map ENOKEY return value from fuse_ll_open to itself, instead of returning EIO by default and printing misleading error message to the user.

Fixes: https://tracker.ceph.com/issues/71230
Signed-off-by: Igor Golikov <igolikov@ibm.com>
Signed-off-by: Igor Golikov <igolikov@ibm.com>
to make sure the memory region with master key is not swapped to the
disk

Signed-off-by: Igor Golikov <igolikov@ibm.com>
@github-actions
Copy link

github-actions bot commented Jun 2, 2025

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@chrisphoffman
Copy link
Owner

Any updates on this @salieri11?

@chrisphoffman chrisphoffman force-pushed the wip-fscrypt branch 4 times, most recently from d546e04 to ef6003e Compare September 25, 2025 17:37
@chrisphoffman chrisphoffman force-pushed the wip-fscrypt branch 7 times, most recently from a3a72ec to 78dca14 Compare October 23, 2025 19:18
@chrisphoffman chrisphoffman force-pushed the wip-fscrypt branch 5 times, most recently from 6e0df0c to 48ad676 Compare October 29, 2025 19:19
@chrisphoffman chrisphoffman force-pushed the wip-fscrypt branch 2 times, most recently from 0fc7547 to 6ec36b4 Compare November 5, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants