Merge branch 'next-queue' into next
[~shefty/rdma-dev.git] / fs / cifs / cifsacl.c
index 854749d21bb1a6a28496e88b0061fbe98a2693b2..3cc1b251ca08eba0a39fc4180d5de360c580f25c 100644 (file)
@@ -910,6 +910,8 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl,
                umode_t group_mask = S_IRWXG;
                umode_t other_mask = S_IRWXU | S_IRWXG | S_IRWXO;
 
+               if (num_aces > ULONG_MAX / sizeof(struct cifs_ace *))
+                       return;
                ppace = kmalloc(num_aces * sizeof(struct cifs_ace *),
                                GFP_KERNEL);
                if (!ppace) {