Message ID | 20230815135602.1014881-2-dongchenchen2@huawei.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [OLK-5.10,v2,1/2] net: tun_chr_open(): set sk_uid from current_fsuid() | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Guessing tree name failed - patch did not apply |
On Tue, Aug 15, 2023 at 09:56:01PM +0800, Dong Chenchen wrote: > From: Laszlo Ersek <lersek@redhat.com> > > stable inclusion > from stable-v5.10.189 > commit 5ea23f1cb67e4468db7ff651627892c9217fec24 > category: bugfix > bugzilla: 189104, https://gitee.com/src-openeuler/kernel/issues/I7QXHX > CVE: CVE-2023-4194 > > Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5ea23f1cb67e4468db7ff651627892c9217fec24 Why are you not just merging directly from the LTS branches into your tree? If you attempt to "cherry-pick" patches like this, you WILL miss valid bugfixes. thanks, greg k-h
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index f8feec522b32..50c2ce392cd1 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -3456,7 +3456,7 @@ static int tun_chr_open(struct inode *inode, struct file * file) tfile->socket.file = file; tfile->socket.ops = &tun_socket_ops; - sock_init_data_uid(&tfile->socket, &tfile->sk, inode->i_uid); + sock_init_data_uid(&tfile->socket, &tfile->sk, current_fsuid()); tfile->sk.sk_write_space = tun_sock_write_space; tfile->sk.sk_sndbuf = INT_MAX;