[LU-15056] Overflow when setting a tbf rule name Created: 04/Oct/21 Updated: 07/Jan/22 Resolved: 06/Jan/22 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.15.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Etienne Aujames | Assignee: | Etienne Aujames |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
VMs with lustre 2.14.53 |
||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
A tbf rule name length is limited to 16 characters (MAX_TBF_NAME). static int nrs_tbf_rule_start(struct ptlrpc_nrs_policy *policy, struct nrs_tbf_head *head, struct nrs_tbf_cmd *start) { struct nrs_tbf_rule *rule; struct nrs_tbf_rule *tmp_rule; struct nrs_tbf_rule *next_rule; char *next_name = start->u.tc_start.ts_next_name; int rc; rule = nrs_tbf_rule_find(head, start->tc_name); if (rule) { nrs_tbf_rule_put(rule); return -EEXIST; } OBD_CPT_ALLOC_PTR(rule, nrs_pol2cptab(policy), nrs_pol2cptid(policy)); if (rule == NULL) return -ENOMEM; memcpy(rule->tr_name, start->tc_name, strlen(start->tc_name)); <--------------------- |
| Comments |
| Comment by Gerrit Updater [ 04/Oct/21 ] |
|
"Etienne AUJAMES <eaujames@ddn.com>" uploaded a new patch: https://review.whamcloud.com/45124 |
| Comment by Gerrit Updater [ 06/Jan/22 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45124/ |
| Comment by Peter Jones [ 06/Jan/22 ] |
|
Landed for 2.15 |
| Comment by Gerrit Updater [ 07/Jan/22 ] |
|
"Etienne AUJAMES <eaujames@ddn.com>" uploaded a new patch: https://review.whamcloud.com/46003 |