X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=fs%2Ffs_context.c;h=483a4d9273e376ef3925f1b0f7227355608ef435;hb=3ff39ef7c551a1b6bbe9a7f9157d87c6529621f3;hp=b7e43a780a625bca1b0faeba53e2702463ad0496;hpb=192ad3c27a4895ee4b2fa31c5b54a932f5bb08c1;p=mirror_ubuntu-jammy-kernel.git diff --git a/fs/fs_context.c b/fs/fs_context.c index b7e43a780a62..483a4d9273e3 100644 --- a/fs/fs_context.c +++ b/fs/fs_context.c @@ -548,7 +548,7 @@ static int legacy_parse_param(struct fs_context *fc, struct fs_parameter *param) param->key); } - if (len > PAGE_SIZE - 2 - size) + if (len > PAGE_SIZE || size + len + 2 > PAGE_SIZE) return invalf(fc, "VFS: Legacy: Cumulative options too large"); if (strchr(param->key, ',') || (param->type == fs_value_is_string &&