From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+5d83cecd003a369a9965@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [isdn4linux?] [nilfs?] INFO: task hung in mISDN_ioctl
Date: Tue, 1 Apr 2025 21:34:57 +0800 [thread overview]
Message-ID: <tencent_CF4FA00DCAA5918DB7127CDDC95DBF190607@qq.com> (raw)
In-Reply-To: <67dad671.050a0220.2ca2c6.0197.GAE@google.com>
#syz test: upstream a29967be967e
diff --git a/drivers/isdn/mISDN/timerdev.c b/drivers/isdn/mISDN/timerdev.c
index 7cfa8c61dba0..0c3771a5cd0b 100644
--- a/drivers/isdn/mISDN/timerdev.c
+++ b/drivers/isdn/mISDN/timerdev.c
@@ -238,8 +238,13 @@ mISDN_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
ret = id;
break;
}
- if (put_user(id, (int __user *)arg))
+ if (!user_write_access_begin((int __user *)arg, sizeof(int))) {
ret = -EFAULT;
+ break;
+ }
+
+ unsafe_put_user(id, (int __user *)arg, Efault);
+ user_write_access_end();
break;
case IMDELTIMER:
if (get_user(id, (int __user *)arg)) {
@@ -255,8 +260,13 @@ mISDN_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
default:
ret = -EINVAL;
}
+out:
mutex_unlock(&mISDN_mutex);
return ret;
+Efault:
+ user_write_access_end();
+ ret = -EFAULT;
+ goto out;
}
static const struct file_operations mISDN_fops = {
next prev parent reply other threads:[~2025-04-01 13:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-19 14:36 syzbot
2025-03-19 16:14 ` Ryusuke Konishi
2025-04-01 13:10 ` Edward Adam Davis
2025-04-01 13:30 ` syzbot
2025-04-01 13:34 ` Edward Adam Davis [this message]
2025-04-01 14:04 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_CF4FA00DCAA5918DB7127CDDC95DBF190607@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+5d83cecd003a369a9965@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®