public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
* Missing Null Pointer check in seq_open
@ 2026-03-05  9:57 Rohit
  2026-04-09  9:14 ` Al Viro
  0 siblings, 1 reply; 2+ messages in thread
From: Rohit @ 2026-03-05  9:57 UTC (permalink / raw)
  To: linux-fsdevel

Hi,

I would like to report a missing NULL pointer check in the fs/seq_file.c APIs.

The seq_open(struct file *file, const struct seq_operations *op) function
does not check whether the second argument is NULL or not.

Other functions, such as seq_read_iter(), directly dereference seq_operations
pointers, possibly resulting in a kernel NULL pointer dereference.

ssize_t seq_read_iter(struct kiocb *iocb, struct iov_iter *iter)
{
struct seq_file *m = iocb->ki_filp->private_data;
....
....

p = m->op->start(m, &m->index);
....
}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-09  9:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05  9:57 Missing Null Pointer check in seq_open Rohit
2026-04-09  9:14 ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox