diff options
-rw-r--r-- | fs/ecryptfs/keystore.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c index af737bb56cb7..5414253d4c97 100644 --- a/fs/ecryptfs/keystore.c +++ b/fs/ecryptfs/keystore.c | |||
@@ -1449,6 +1449,12 @@ parse_tag_11_packet(unsigned char *data, unsigned char *contents, | |||
1449 | rc = -EINVAL; | 1449 | rc = -EINVAL; |
1450 | goto out; | 1450 | goto out; |
1451 | } | 1451 | } |
1452 | if (unlikely((*tag_11_contents_size) > max_contents_bytes)) { | ||
1453 | printk(KERN_ERR "Literal data section in tag 11 packet exceeds " | ||
1454 | "expected size\n"); | ||
1455 | rc = -EINVAL; | ||
1456 | goto out; | ||
1457 | } | ||
1452 | if (data[(*packet_size)++] != 0x62) { | 1458 | if (data[(*packet_size)++] != 0x62) { |
1453 | printk(KERN_WARNING "Unrecognizable packet\n"); | 1459 | printk(KERN_WARNING "Unrecognizable packet\n"); |
1454 | rc = -EINVAL; | 1460 | rc = -EINVAL; |