This repository has been archived by the owner on Feb 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 178
BUG: KASAN: global-out-of-bounds in crgetgroups+0x31/0x60 #556
Comments
I think I know what the problem is. crgetgroups is trying to access init_groups.blocks[0]. |
I don't think |
Yes, check is necessary. |
This was referenced Oct 19, 2016
Closed
behlendorf
pushed a commit
that referenced
this issue
Oct 20, 2016
No need to crhold current_cred(), fix possible leak in splat_cred_test2 Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes #556
behlendorf
pushed a commit
to behlendorf/spl
that referenced
this issue
Jan 20, 2017
init_groups has 0 nblocks, therefore calling the current crgetgroups with init_groups would result in out-of-bound access. We fix this by returning NULL when nblocks is 0. Cap crgetngroups to NGROUPS_PER_BLOCK, since crgetgroups will only return blocks[0]. Also, remove all get_group_info. The cred already holds reference on the group_info, and cred is not mutable. So there's no reason to hold extra reference, if we hold cred. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes openzfs#556
behlendorf
pushed a commit
to behlendorf/spl
that referenced
this issue
Feb 2, 2017
init_groups has 0 nblocks, therefore calling the current crgetgroups with init_groups would result in out-of-bound access. We fix this by returning NULL when nblocks is 0. Cap crgetngroups to NGROUPS_PER_BLOCK, since crgetgroups will only return blocks[0]. Also, remove all get_group_info. The cred already holds reference on the group_info, and cred is not mutable. So there's no reason to hold extra reference, if we hold cred. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes openzfs#556
behlendorf
pushed a commit
to behlendorf/spl
that referenced
this issue
Feb 3, 2017
No need to crhold current_cred(), fix possible leak in splat_cred_test2 Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes openzfs#556
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm not familiar with this, so I'm not sure what's wrong.
The text was updated successfully, but these errors were encountered: