Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust 1.58.1 "malicious" .../i686-pc-windows-msvc/lib/std-41d48f5938a7bd14.dll #93187

Open
wodin opened this issue Jan 22, 2022 · 12 comments
Open
Assignees
Labels
O-windows Operating system: Windows O-x86_32 Target: x86 processors, 32 bit (like i686-*) O-x86_64 Target: x86-64 processors (like x86_64-*)

Comments

@wodin
Copy link

wodin commented Jan 22, 2022

I upgraded to rust 1.58.1 using rustup (installed from Homebrew) on my Apple M1 Mac and my antivirus software quarantined one of the DLLs with the following message:

An infected file attempted to run on your device.
Threat name: Gen:Variant.Jaik.50076
Path: /Users/michael/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/i686-pc-windows-msvc/lib/std-41d48f5938a7bd14.dll
We quarantined the file to prevent malicious commands from being executed on your device.

I uploaded it to Virustotal and found that several antivirus vendors detect it as malicious:

Virustotal: 15 security vendors and no sandboxes flagged this file as malicious

@cuviper
Copy link
Member

cuviper commented Jan 22, 2022

Rust started using different Windows API calls in commit 4f0ad1c (cc @ChrisDenton) to deal with CVE-2022-21658. Virus scanners are often based on heuristics, and it's quite possible that this change made it look similar in some way to patterns found in a known virus.

15 scanners flagged it, but they're a minority against the 48 that did not!

@wodin
Copy link
Author

wodin commented Jan 22, 2022

Sure, I suspect it's a false positive. Still, it seems worth trying to do something about it?

"Only 15 of 63 flagged it as malicious" is not that comforting :)

@ChrisDenton
Copy link
Member

This only affects the 32bit dll, right? Hmm... my local scanner doesn't report anything, does yours have a way to report false positives? Malware scanning is a bit outside my expertise unfortunately.

@wodin
Copy link
Author

wodin commented Jan 22, 2022

Yes, only that specific dll is detected.

You can upload a file to virustotal.com to have it scanned by a bunch of different antivirus products.

Reporting seems to be a matter of contacting each vendor who detects the file :-/

https://support.virustotal.com/hc/en-us/articles/115002121185-I-am-experiencing-a-false-positive-my-file-or-site-should-not-be-detected-

I've reported it to my antivirus vendor here:
https://www.bitdefender.com/consumer/support/answer/29358/

EDIT: Closed issue by mistake and have reopened it. I have seen some mentions of "VirusTotalMonitor" which is supposed to allow you to get notified early of this sort of thing for software you're developing, but the links are broken 🤷‍♂️

@wodin wodin closed this as completed Jan 22, 2022
@wodin wodin reopened this Jan 22, 2022
@nagisa
Copy link
Member

nagisa commented Jan 22, 2022

In general AV issues should be reported to AV vendors. We cannot really do anything about their invalid heuristics, and most of us aren't their clients.

@workingjubilee
Copy link
Member

A compiler toolchain, essentially by definition, "does something suspicious": generate a new program and then run it, potentially trashing existing files somewhere along the way. Why, do you know what does that? Viruses do that! It is a small miracle of programming and perhaps tribute to antivirus creators that the Rust toolchain is not always detected as a virus... or maybe a bug, since, naturally, Rust's libstd contains the necessary machine code to, if it is executed, do various nasty things.

Rustup (for Linux) and the Rust std*.dll for x86-64 Windows are both also flagged:

Though it seems most ELF programs and libraries, including our libstd.so, are completely pure in the eyes of VirusTotal. 😇

@wodin
Copy link
Author

wodin commented Jan 25, 2022

FWIW, the number of vendors/products that flag i686-pc-windows-msvc/lib/std-41d48f5938a7bd14.dll as malicious has now dropped to 5.

@workingjubilee
Copy link
Member

4 today, as it turns out!

@workingjubilee workingjubilee added the O-windows Operating system: Windows label Mar 21, 2023
@workingjubilee
Copy link
Member

workingjubilee commented Jul 22, 2023

Down to 3 on this report:

I ran a new VirusTotal on some recent nightly stdlibs, apparently 1 for x86_64-pc-windows-msvc and one for i686-pc-windows-msvc, now:

I have taken the liberty of reporting the holdouts to their support teams, with the exception of Rising Antivirus (I was not able to find anywhere to report it).

@workingjubilee workingjubilee self-assigned this Jul 22, 2023
@workingjubilee
Copy link
Member

I will let everyone know how my support tickets go, and then assuming I hear back from people, I will likely close this issue as complete, and simply let everyone know which antivirus companies refuse to correct their scanners. That is the only degree to which the ticket is actionable, so it is the action to take.

@Noratrieb Noratrieb added O-x86_32 Target: x86 processors, 32 bit (like i686-*) O-x86_64 Target: x86-64 processors (like x86_64-*) and removed O-x86-all labels Oct 25, 2023
@bjorn3
Copy link
Member

bjorn3 commented Oct 27, 2023

@workingjubilee
Copy link
Member

Yes, except for the Zillya holdout, everyone responded positively. Don't know why McAfee is still flagging. Zillya wanted me to submit more binaries directly to them for them to understand what I meant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows O-x86_32 Target: x86 processors, 32 bit (like i686-*) O-x86_64 Target: x86-64 processors (like x86_64-*)
Projects
None yet
Development

No branches or pull requests

7 participants