Send MinGW-Notify mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.osdn.me/mailman/listinfo/mingw-notify
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of MinGW-Notify digest..."
Please do not reply to this notification; the sender address is unable to
accept incoming e-mail. If you wish to unsubscribe you can do so at
https://lists.osdn.me/mailman/listinfo/mingw-notify.
Today's Topics:
1. [mingw] #40696: MSVCRT.DLL's _pgmptr variable is
uninitialized by MinGW start-up code (MinGW Notification List)
2. [mingw] #40696: MSVCRT.DLL's _pgmptr variable is
uninitialized by MinGW start-up code (MinGW Notification List)
3. [mingw] #40613: Viruses when compiling with gcc or g++
(MinGW Notification List)
----------------------------------------------------------------------
Message: 1
Date: Tue, 01 Sep 2020 20:31:42 +0100
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #40696: MSVCRT.DLL's _pgmptr variable
is uninitialized by MinGW start-up code
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
#40696: MSVCRT.DLL's _pgmptr variable is uninitialized by MinGW start-up code
Open Date: 2020-08-31 23:32
Last Update: 2020-09-01 20:31
URL for this Ticket:
https://osdn.net//projects/mingw/ticket/40696
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=40696
---------------------------------------------------------------------
Last Changes/Comment on this Ticket:
2020-09-01 20:31 Updated by: keith
Comment:
The following (trivial) program illustrates the issue:
1. #include <stdio.h>
2. #include <stdlib.h>
3.
4. #ifdef _CRT_GLOB
5. int _CRT_glob = _CRT_GLOB;
6. #endif
7.
8. int main()
9. { printf( "_pgmptr = '%s'\n", _pgmptr );
10. return 0;
11. }
If I compile this, with default settings for _CRT_glob, link with current
mingwrt, and run it (under MSYS) on a Win7, or WinXP VM, I see:
$ mingw32-gcc t-pgmptr.c -o pgmptr.exe
$ ./pgmptr.exe
_pgmptr = '(null)'
OTOH, if I compile it with -D_CRT_GLOB=1, or with -D_CRT_GLOB=0, either of
which causes the mingwrt start-up code to call Microsoft's __getmainargs(), I
see (as expected):
$ mingw32-gcc -D_CRT_GLOB=1 t-pgmptr.c -o pgmptr.exe
$ ./pgmptr.exe
_pgmptr = 'e:\sandbox\pgmptr.exe'
Curiously, I didn't notice the anomalous default behaviour previously, (testing
on GNU/Linux, under Wine), because Wine's implementation of MSVCRT.DLL appears
to initialize _pgmptr without __getmainargs() having been called.
---------------------------------------------------------------------
Ticket Status:
Reporter: keith
Owner: keith
Type: Issues
Status: Open [Owner assigned]
Priority: 5 - Medium
MileStone: (None)
Component: WSL
Severity: 5 - Medium
Resolution: None
---------------------------------------------------------------------
Ticket details:
According to Microsoft's GetModulePathNameA() function documentation:
The global variable _pgmptr is automatically initialized to the full path of
the executable file,
and can be used to retrieve the full path name of an executable file.
It appears that this global variable initialization occurs, only if the
run-time start-up code calls Microsoft's __getmainargs() function, but that
exhibits defective globbing of wild-card patterns, and MinGW has not used it,
as a default start-up hook, since the release of mingwrt-3.21, in December
2014. Consequently, references to _pgmptr, in code linked against mingwrt-3.21
(and later), are likely to dereference a NULL pointer.
--
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN
Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net
URL for this Ticket:
https://osdn.net/projects/mingw/ticket/40696
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=40696
------------------------------
Message: 2
Date: Tue, 01 Sep 2020 21:24:27 +0100
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #40696: MSVCRT.DLL's _pgmptr variable
is uninitialized by MinGW start-up code
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
#40696: MSVCRT.DLL's _pgmptr variable is uninitialized by MinGW start-up code
Open Date: 2020-08-31 23:32
Last Update: 2020-09-01 21:24
URL for this Ticket:
https://osdn.net//projects/mingw/ticket/40696
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=40696
---------------------------------------------------------------------
Last Changes/Comment on this Ticket:
2020-09-01 21:24 Updated by: keith
* Details Updated
---------------------------------------------------------------------
Ticket Status:
Reporter: keith
Owner: keith
Type: Issues
Status: Open [Owner assigned]
Priority: 5 - Medium
MileStone: (None)
Component: WSL
Severity: 5 - Medium
Resolution: None
---------------------------------------------------------------------
Ticket details:
According to Microsoft's GetModuleFileNameA() function documentation:
The global variable _pgmptr is automatically initialized to the full path of
the executable file,
and can be used to retrieve the full path name of an executable file.
It appears that this global variable initialization occurs, only if the
run-time start-up code calls Microsoft's __getmainargs() function, but that
exhibits defective globbing of wild-card patterns, and MinGW has not used it,
as a default start-up hook, since the release of mingwrt-3.21, in December
2014. Consequently, references to _pgmptr, in code linked against mingwrt-3.21
(and later), are likely to dereference a NULL pointer.
--
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN
Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net
URL for this Ticket:
https://osdn.net/projects/mingw/ticket/40696
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=40696
------------------------------
Message: 3
Date: Tue, 01 Sep 2020 22:38:40 +0100
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #40613: Viruses when compiling with
gcc or g++
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
#40613: Viruses when compiling with gcc or g++
Open Date: 2020-08-04 05:37
Last Update: 2020-09-01 22:38
URL for this Ticket:
https://osdn.net//projects/mingw/ticket/40613
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=40613
---------------------------------------------------------------------
Last Changes/Comment on this Ticket:
2020-09-01 22:38 Updated by: keith
* Status Update from Open to Closed
* Resolution Update from None to Won't Fix
* Severity Update from 9 - Highest to 1 - Lowest
* Priority Update from 9 - Highest to 1 - Lowest
Comment:
Did you read the ticket submission guidelines? If you did, you chose to ignore
them, which isn't going to earn you any credibility here.
Did you check the GPG signatures of the package files you downloaded? We do not
publish infected files, so if the signatures match, then perhaps you have
infected what you uploaded to VirusTotal. Otherwise, VirusTotal is probably
wrong. FWIW, I have absolutely zero confidence in VirusTotal, anyway, so I'm
closing this, and will take no consequent action.
---------------------------------------------------------------------
Ticket Status:
Reporter: int8
Owner: (None)
Type: Issues
Status: Closed
Priority: 1 - Lowest
MileStone: (None)
Component: GCC
Severity: 1 - Lowest
Resolution: Won't Fix
---------------------------------------------------------------------
Ticket details:
I downloaded mingw-get-setup.exe and used it to install gcc, g++, and MSYS. I
compiled a simple binary which does nothing except print hello world and
uploaded it to virustotal.com. To my horror, virustotal found numerous
positives in the hello world executables. I am almost positive that there is no
way that virustotal would have this many false positives, so please look into
rebuilding whatever part of MinGW is the source of this malware. Attached are
links to the virustotal scans of basic hello world executables compiled with
gcc and g++ from MinGW, along with whatever I could dredge up on the web
pertaining to this.
https://www.virustotal.com/gui/file/
561a3bdcef261beb2a58dca5d51d4d7d561d555d4caa6606eb3e481bf1141e16/detection
https://www.virustotal.com/gui/file/
176cf53ca0564af53fbde5ee65963dbdfb4ea426bac821bbba2c71148cdb9806/detection
https://github.com/Genymobile/scrcpy/issues/1102
--
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN
Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net
URL for this Ticket:
https://osdn.net/projects/mingw/ticket/40613
RSS feed for this Ticket:
https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=40613
------------------------------
Subject: Digest Footer
_______________________________________________
MinGW-Notify mailing list
[email protected]
https://lists.osdn.me/mailman/listinfo/mingw-notify
------------------------------
End of MinGW-Notify Digest, Vol 36, Issue 2
*******************************************