Bug 1788806
| Summary: | __server_getspec(), volume path limited to 255 chars | ||
|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | sean |
| Component: | glusterd | Assignee: | Sanju <srakonde> |
| Status: | CLOSED UPSTREAM | QA Contact: | |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6 | CC: | bugs, pasik, srakonde, sunkumar |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-03-17 03:24:29 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
sean
2020-01-08 07:14:16 UTC
Sunny,
I see the below code in __server_getspec(). Can we have snapshot name whose length is more NAME_MAX? If so, how the checks are handled in other code paths? Are we using any other macro?
libglusterfs/src/glusterfs/compat.h:324:#define NAME_MAX 255
volume = args.key;
if (strlen(volume) >= (NAME_MAX)) {
op_errno = EINVAL;
gf_msg(this->name, GF_LOG_ERROR, EINVAL, GD_MSG_NAME_TOO_LONG,
"volume name too long (%s)", volume);
goto fail;
}
Thanks,
Sanju
Hi Sanju, The patch[1] was added to prevent service denial attacks, which basically reason behind this failure. Will check and update more. [1]. https://review.gluster.org/#/c/glusterfs/+/21528/. /sunny Any update on this, Sunny? This bug is moved to https://github.com/gluster/glusterfs/issues/1107, and will be tracked there from now on. Visit GitHub issues URL for further details removing needinfo as this bug has been moved to Github, please check issue-1107 for further update. |