Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #64745
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Newsgroups | linux.debian.bugs.dist, linux.debian.kernel |
| Subject | Bug#934304: [PATCH] tracefs: Fix potential null dereference in default_file_open() |
| Date | 2019-08-12 02:40 +0200 |
| Message-ID | <yu6xs-5um-5@gated-at.bofh.it> (permalink) |
| References | <ytatr-1mI-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Cross-posted to 2 groups.
[Multipart message — attachments visible in raw view] - view raw
The "open" operation in struct file_operations is optional, and
ftrace_event_id_fops does not set it. In default_file_open(), after
all other checks have passed, return 0 if the underlying struct
file_operations does not implement open.
Fixes: 757ff7244358 ("tracefs: Restrict tracefs when the kernel is …")
References: https://bugs.debian.org/934304
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
fs/tracefs/inode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c
index 34da48036e08..761af8ce4015 100644
--- a/fs/tracefs/inode.c
+++ b/fs/tracefs/inode.c
@@ -42,6 +42,8 @@ static int default_open_file(struct inode *inode, struct file *filp)
return ret;
real_fops = dentry->d_fsdata;
+ if (!real_fops->open)
+ return 0;
return real_fops->open(inode, filp);
}
Back to linux.debian.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Bug#934304: linux-image-5.2.0-2-amd64: powertop aborts on version 5.2 Reinhard Karcher <reinhard.karcher@gmx.net> - 2019-08-09 12:40 +0200
Bug#934304: linux-image-5.2.0-2-amd64: powertop aborts on version 5.2 Reinhard Karcher <reinhard.karcher@online.de> - 2019-08-09 12:50 +0200
Bug#934304: linux-image-5.2.0-2-amd64: powertop aborts on version 5.2 Bernhard Übelacker <bernhardu@mailbox.org> - 2019-08-09 15:10 +0200
Bug#934304: linux-image-5.2.0-2-amd64: powertop aborts on version 5.2 Reinhard Karcher <reinhard.karcher@gmx.net> - 2019-08-09 15:50 +0200
Bug#934304: linux-image-5.2.0-2-amd64: powertop aborts on version 5.2 Bernhard Übelacker <bernhardu@mailbox.org> - 2019-08-10 16:30 +0200
Bug#934304: linux-image-5.2.0-2-amd64: powertop aborts on version 5.2 Salvatore Bonaccorso <carnil@debian.org> - 2019-08-11 12:00 +0200
Processed: Re: Bug#934304: linux-image-5.2.0-2-amd64: powertop aborts on version 5.2 "Debian Bug Tracking System" <owner@bugs.debian.org> - 2019-08-09 15:10 +0200
Bug#934304: [PATCH] tracefs: Fix potential null dereference in default_file_open() Ben Hutchings <ben@decadent.org.uk> - 2019-08-12 02:40 +0200
csiph-web