Skip to contentSkip to conversation

KMSAN: uninit-value in alauda_check_media

DISCUSSION Jas K 2 participants 2 messages Oct 11, 2019

Subsystems (2)
lore
Share & tools
lore

Jas K

author
#0 lore raw

Hi, just taking a crack at this. Hope you guys don't mind.

#syz test: https://github.com/google/kasan.git 1e76a3e5

drivers/usb/storage/alauda.c +1 -1
index ddab2cd3d2e7..bb309b9ad65b 100644
@@ -452,7 +452,7 @@ static int alauda_init_media(struct us_data *us)
 static int alauda_check_media(struct us_data *us)
 {
 	struct alauda_info *info = (struct alauda_info *) us->extra;
-	unsigned char status[2];
+	unsigned char *status = us->iobuf;
 	int rc;
 
 	rc = alauda_get_media_status(us, status);
syzbot
#1 lore raw
KMSAN bugs can only be tested on https://github.com/google/kmsan.git tree because KMSAN tool is not upstreamed yet. See https://goo.gl/tpsmEJ#kmsan-bugs for details.
Quoted 3 lines

Hi, just taking a crack at this. Hope you guys don't mind.

#syz test: https://github.com/google/kasan.git 1e76a3e5

KMSAN bugs can only be tested on https://github.com/google/kmsan.git tree because KMSAN tool is not upstreamed yet.
See https://goo.gl/tpsmEJ#kmsan-bugs for details.

Quoted 13 lines
drivers/usb/storage/alauda.c +1 -1
index ddab2cd3d2e7..bb309b9ad65b 100644
@@ -452,7 +452,7 @@ static int alauda_init_media(struct us_data *us)
  static int alauda_check_media(struct us_data *us)
  {
  	struct alauda_info *info = (struct alauda_info *) us->extra;
-	unsigned char status[2];
+	unsigned char *status = us->iobuf;
  	int rc;
 
  	rc = alauda_get_media_status(us, status);