[bug report] crypto: chtls - Inline TLS record Tx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Atul Gupta,

The patch 36bedb3f2e5b: "crypto: chtls - Inline TLS record Tx" from
Mar 31, 2018, leads to the following static checker warning:

	drivers/crypto/chelsio/chtls/chtls_io.c:913 tls_header_read()
	warn: signedness bug returning '(-14)'

drivers/crypto/chelsio/chtls/chtls_io.c
   909  /* Read TLS header to find content type and data length */
   910  static u16 tls_header_read(struct tls_hdr *thdr, struct iov_iter *from)
               ^^^
   911  {
   912          if (copy_from_iter(thdr, sizeof(*thdr), from) != sizeof(*thdr))
   913                  return -EFAULT;

This has a signedness bug and the caller doesn't check for errors.

   914          return (__force u16)cpu_to_be16(thdr->length);
   915  }

regards,
dan carpenter



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux