lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <DG1B2T5I7REV.30XR7YCI0RSZ4@canonical.com>
Date: Thu, 29 Jan 2026 13:04:57 -0600
From: "Zachary M. Raines" <zachary.raines@...onical.com>
To: "Christian Brauner" <brauner@...nel.org>
Cc: "Alexander Viro" <viro@...iv.linux.org.uk>,
 <linux-fsdevel@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: PROBLEM: Duplicated entries in /proc/<pid>/mountinfo

On Thu Jan 29, 2026 at 8:28 AM CST, Christian Brauner wrote:
> On Wed, Jan 28, 2026 at 08:49:12AM -0600, Zachary M. Raines wrote:
>> ...
>> 2. Reads `/prod/1/mountinfo` and checks for duplicates
>>
>> #!/bin/bash
>> THRESHOLD=75
>> echo "Starting monitoring at $(date)"
>> while true; do
>>     # Get mountinfo entries and count total
>>     mountinfo="$(cat /proc/1/mountinfo)"
>>     mountinfo_count=$(echo "$mountinfo" | wc -l)
>>
>>     if ((mountinfo_count > THRESHOLD)); then
>>         echo "$(date): Mount count ($mountinfo_count) exceeds threshold ($THRESHOLD)"
>>
>>         # Find and log duplicate mount points with their counts
>>         duplicates=$(echo "$mountinfo" | sort | uniq -cd)
>>
>>         if [[ -n "$duplicates" ]]; then
>>             echo "Duplicate mounts :"
>>             echo "$duplicates"
>>         fi
>>         echo "====="
>>         echo "$mountinfo"
>>         echo "---"
>>     fi
>>
>>     sleep 0.1
>> done
>> ...

> Thanks for the report. So it's a bit unfortunate that you're showing
> duplication by source path. That's not as useful as that can
> legitimately happen. So the better test would be to see whether you get
> any duplicated unique mount ids, i.e., whether the same
> mnt->mnt_id_unique appears multiple times. Because that's a bug for
> sure.

It turns out I pasted the output of an old version of my test script,
above, but if you look at the script itself, it checks for duplicates,
of the entire mountinfo line, i.e., duplicates have the same unique id.

> I suspect the issue is real though. I'm appending a patch as a proposed
> fix. Can you test that and report back, please? I'm traveling tomorrow
> so might take a little.

Thank you for the quick turnaround on that patch. I applied it on top
of 6.19-rc7 and after about 3 hrs I haven't seen any duplicates, in
contrast to without the patch where they appear in under 10 minutes.

Let me know if there's any other testing that would help.

Best,
Zach

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ