Bug #38743
cephfs-shell: mkdir creates directory with invalid octal mode
% Done:
0%
Source:
Development
Tags:
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Client, cephfs-shell
Labels (FS):
task(easy), task(intern)
Pull request ID:
Crash signature:
Description
CephFS:~/>>> mkdir -m 07000 d3 CephFS:~/>>> ls -l drwxrwxrwx 0 25405 25405 2019-03-14 12:12:29 d1/ drwx------ 0 25405 25405 2019-03-14 18:04:46 d2/ d--------- 0 25405 25405 2019-03-14 18:18:31 d3/ CephFS:~/>>> mkdir -m 070000 d4 CephFS:~/>>> ls -l drwxrwxrwx 0 25405 25405 2019-03-14 12:12:29 d1/ drwx------ 0 25405 25405 2019-03-14 18:04:46 d2/ d--------- 0 25405 25405 2019-03-14 18:18:31 d3/ d--------- 0 25405 25405 2019-03-14 18:18:48 d4/ CephFS:~/>>> mkdir -m 0700001 d5 CephFS:~/>>> ls -l drwxrwxrwx 0 25405 25405 2019-03-14 12:12:29 d1/ drwx------ 0 25405 25405 2019-03-14 18:04:46 d2/ d--------- 0 25405 25405 2019-03-14 18:18:31 d3/ d--------- 0 25405 25405 2019-03-14 18:18:48 d4/ d--------x 0 25405 25405 2019-03-14 18:21:50 d5/ CephFS:~/>>> mkdir -m -0700001 d6 CephFS:~/>>> ls -l drwxrwxrwx 0 25405 25405 2019-03-14 12:12:29 d1/ drwx------ 0 25405 25405 2019-03-14 18:04:46 d2/ d--------- 0 25405 25405 2019-03-14 18:18:31 d3/ d--------- 0 25405 25405 2019-03-14 18:18:48 d4/ d--------x 0 25405 25405 2019-03-14 18:21:50 d5/ drwxrwxrwx 0 25405 25405 2019-03-14 18:24:07 d6/
Octal mode requires rigorous parsing and validation.
This is also a bug with the Ceph client user-space library. We should validate the mode given for Client::create().
Related issues
History
#1 Updated by Patrick Donnelly almost 2 years ago
- Description updated (diff)
- Assignee set to Milind Changire
- Target version set to v15.0.0
- Start date deleted (
03/14/2019) - Source set to Development
- Backport set to nautilus
- Component(FS) Client added
- Labels (FS) task(easy), task(intern) added
#2 Updated by Milind Changire almost 2 years ago
- Status changed from New to Fix Under Review
- Pull request ID set to 27235
#3 Updated by Patrick Donnelly almost 2 years ago
- Status changed from Fix Under Review to Pending Backport
#4 Updated by Nathan Cutler almost 2 years ago
- Copied to Backport #39376: nautilus: cephfs-shell: mkdir creates directory with invalid octal mode added
#5 Updated by Nathan Cutler over 1 year ago
- Status changed from Pending Backport to Resolved