lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <000000000000616c0e061e9bd272@google.com>
Date: Thu, 01 Aug 2024 02:27:38 -0700
From: syzbot <syzbot+24ac24ff58dc5b0d26b9@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [squashfs?] KMSAN: uninit-value in pick_link

For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org.

***

Subject: Re: [syzbot] [squashfs?] KMSAN: uninit-value in pick_link
Author: lizhi.xu@...driver.com

why folio not inited?

#syz test: upstream 2f8c4f506285

diff --git a/mm/filemap.c b/mm/filemap.c
index 657bcd887fdb..b76a13395299 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -3754,11 +3754,15 @@ static struct folio *do_read_cache_folio(struct address_space *mapping,
 		if (!folio)
 			return ERR_PTR(-ENOMEM);
 		err = filemap_add_folio(mapping, folio, index, gfp);
+		printk("err: %d, folio: %p, in: %p, %s\n", err, folio, mapping->host, __func__);
 		if (unlikely(err)) {
 			folio_put(folio);
 			if (err == -EEXIST)
 				goto repeat;
 			/* Presumably ENOMEM for xarray node */
+			void *kaddr = kmap_local_folio(folio, 0);
+			memset(kaddr, 0, folio_size(folio));
+			kunmap_local(kaddr);
 			return ERR_PTR(err);
 		}
 
@@ -3791,6 +3795,7 @@ static struct folio *do_read_cache_folio(struct address_space *mapping,
 		folio_put(folio);
 		if (err == AOP_TRUNCATED_PAGE)
 			goto repeat;
+		printk("err: %d, folio: %p, %s\n", err, folio, __func__);
 		return ERR_PTR(err);
 	}
 
diff --git a/fs/namei.c b/fs/namei.c
index 3a4c40e12f78..3f72aa8d604d 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -5272,6 +5272,8 @@ const char *page_get_link(struct dentry *dentry, struct inode *inode,
 		page = read_mapping_page(mapping, 0, NULL);
 		if (IS_ERR(page))
 			return (char*)page;
+		else if (IS_ERR(page_folio(page)))
+			return (char*)page_folio(page);
 	}
 	set_delayed_call(callback, page_put_link, page);
 	BUG_ON(mapping_gfp_mask(mapping) & __GFP_HIGHMEM);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ