mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-24 11:29:10 +00:00
Disallow negative UIDs when processing quotactl options.
This commit is contained in:
parent
4e99994cc9
commit
3c0508582d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166380
@ -891,6 +891,11 @@ dqget(vp, id, ump, type, dqp)
|
||||
struct uio auio;
|
||||
int error;
|
||||
|
||||
/* XXX: Disallow negative id values to prevent the
|
||||
* creation of 100GB+ quota data files.
|
||||
*/
|
||||
if ((int)id < 0)
|
||||
return (EINVAL);
|
||||
dqvp = ump->um_quotas[type];
|
||||
if (dqvp == NULLVP || (ump->um_qflags[type] & QTF_CLOSING)) {
|
||||
*dqp = NODQUOT;
|
||||
|
Loading…
Reference in New Issue
Block a user