<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://vulnerability.circl.lu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-09-30T20:45:57.714510+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@circl.lu</email>
  </author>
  <link href="https://vulnerability.circl.lu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/cve-2022-49271</id>
    <title>CVE-2022-49271 — cifs: prevent bad output lengths in smb2_ioctl_query_info()</title>
    <updated>2026-09-30T20:45:57.716852+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> Linux</p>
<p>In the Linux kernel, the following vulnerability has been resolved:</p>
<p>cifs: prevent bad output lengths in smb2_ioctl_query_info()</p>
<p>When calling smb2_ioctl_query_info() with
smb_query_info::flags=PASSTHRU_FSCTL and
smb_query_info::output_buffer_length=0, the following would return
0x10</p>
<p>buffer = memdup_user(arg + sizeof(struct smb_query_info),
			     qi.output_buffer_length);
	if (IS_ERR(buffer)) {
		kfree(vars);
		return PTR_ERR(buffer);
	}</p>
<p>rather than a valid pointer thus making IS_ERR() check fail.  This
would then cause a NULL ptr deference in @buffer when accessing it
later in smb2_ioctl_query_ioctl().  While at it, prevent having a
@buffer smaller than 8 bytes to correctly handle SMB2_SET_INFO
FileEndOfFileInformation requests when
smb_query_info::flags=PASSTHRU_SET_INFO.</p>
<p>Here is a small C reproducer which triggers a NULL ptr in @buffer when
passing an invalid smb_query_info::flags</p>
<p>#include &lt;stdio.h&gt;
	#include &lt;stdlib.h&gt;
	#include &lt;stdint.h&gt;
	#include &lt;unistd.h&gt;
	#include &lt;fcntl.h&gt;
	#include &lt;sys/ioctl.h&gt;</p>
<p>#define die(s) perror(s), exit(1)
	#define QUERY_INFO 0xc018cf07</p>
<p>int main(int argc, char *argv[])
	{
		int fd;</p>
<p>if (argc &lt; 2)
			exit(1);
		fd = open(argv[1], O_RDONLY);
		if (fd == -1)
			die("open");
		if (ioctl(fd, QUERY_INFO, (uint32_t[]) { 0, 0, 0, 4, 0, 0}) == -1)
			die("ioctl");
		close(fd);
		return 0;
	}</p>
<p>mount.cifs //srv/share /mnt -o ...
	gcc repro.c &amp;&amp; ./a.out /mnt/f0</p>
<p>[  114.138620] general protection fault, probably for non-canonical address…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/cve-2022-49271"/>
  </entry>
</feed>
