Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cifs_dbg() outputs an uninitialized buffer in cifs_readdir()

In some cases tmp_bug can be not filled in cifs_filldir and stay uninitialized,
therefore its printk with "%s" modifier can leak content of kernelspace memory.
If old content of this buffer does not contain '\0' access bejond end of
allocated object can crash the host.

Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Steve French <sfrench@localhost.localdomain>
CC: Stable <stable@vger.kernel.org>

authored by

Vasily Averin and committed by
Steve French
01b9b0b2 820962dc

+1
+1
fs/cifs/readdir.c
··· 847 847 * if buggy server returns . and .. late do we want to 848 848 * check for that here? 849 849 */ 850 + *tmp_buf = 0; 850 851 rc = cifs_filldir(current_entry, file, ctx, 851 852 tmp_buf, max_len); 852 853 if (rc) {