<?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-29T20:49:04.921703+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-2025-40072</id>
    <title>CVE-2025-40072 — fanotify: Validate the return value of mnt_ns_from_dentry() before dereferencing</title>
    <updated>2026-09-29T20:49:04.923946+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>fanotify: Validate the return value of mnt_ns_from_dentry() before dereferencing</p>
<p>The function do_fanotify_mark() does not validate if
mnt_ns_from_dentry() returns NULL before dereferencing mntns-&gt;user_ns.
This causes a NULL pointer dereference in do_fanotify_mark() if the
path is not a mount namespace object.</p>
<p>Fix this by checking mnt_ns_from_dentry()'s return value before
dereferencing it.</p>
<p>Before the patch</p>
<p>$ gcc fanotify_nullptr.c -o fanotify_nullptr
$ mkdir A
$ ./fanotify_nullptr
Fanotify fd: 3
fanotify_mark: Operation not permitted
$ unshare -Urm
Fanotify fd: 3
Killed</p>
<p>int main(void){
    int ffd;
    ffd = fanotify_init(FAN_CLASS_NOTIF | FAN_REPORT_MNT, 0);
    if(ffd &lt; 0){
        perror("fanotify_init");
        exit(EXIT_FAILURE);
    }</p>
<p>printf("Fanotify fd: %d\n",ffd);</p>
<p>if(fanotify_mark(ffd, FAN_MARK_ADD | FAN_MARK_MNTNS,
FAN_MNT_ATTACH, AT_FDCWD, "A") &lt; 0){
        perror("fanotify_mark");
        exit(EXIT_FAILURE);
    }</p>
<p>return 0;
}</p>
<p>After the patch</p>
<p>$ gcc fanotify_nullptr.c -o fanotify_nullptr
$ mkdir A
$ ./fanotify_nullptr
Fanotify fd: 3
fanotify_mark: Operation not permitted
$ unshare -Urm
Fanotify fd: 3
fanotify_mark: Invalid argument</p>
<p>[   25.694973] BUG: kernel NULL pointer dereference, address: 0000000000000038
[   25.695006] #PF: supervisor read access in kernel mode
[   25.695012] #PF: error_code(0x0000) - not-present page
[   25.695017] PGD 109a30067 P4D 109a30067 PUD 142b460…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/cve-2025-40072"/>
  </entry>
</feed>
