[Jack-Devel] JACK library on Windows causes crash if used within an ASLR application

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[Jack-Devel] JACK library on Windows causes crash if used within an ASLR application

Jörg Müller
Hi,

the latest available JACK library 1.9.11 crashes any application
accessing the JACK library if the application has been built with ASLR
enabled. ASLR has been in Windows since 2007 and is enabled by default
in Microsoft's C++ toolchain since 2012.

With this feature being enabled in more and more applications over the
years, the current situation is that a lot of applications crash
silently when JACK is installed on the system without giving the user
any clue about what is going on. This includes audio middlewares like
FMOD (until v1.10.14 implemented a safety protection against bad ASIO
drivers) or Wwise and likely other popular DAWs.
On top of that, it forces other developers whose software uses the JACK
library to disable ASLR in their build settings.
It should also be noted, that this is not always possible, for instance
in the case of a developer using the JACK library to create a plugin
that is used in a different host software of which the developer has no
control about the build process.

Is there anything that can be done to fix the Windows version of JACK?

Best,
Jörg
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: JACK library on Windows causes crash if used within an ASLR application

Christopher Arndt
Am 05.09.19 um 13:45 schrieb Jörg Müller:
> Is there anything that can be done to fix the Windows version of JACK?

The best would probably to open a ticket in the jack2 github issue
tracker here:

https://github.com/jackaudio/jack2/issues

Attach a small example program, which exhibits the crash along with
instructions how you build and run it on windows and any error output
(maybe some of the programs in the example-clients folder will do the
job). If you're able to build a debug version and run that in a debugger
to show the exact location where the crash occurs, even better.

Also include information about your compiler, versions of linked
libraries etc.


Chris
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: JACK library on Windows causes crash if used within an ASLR application

Jörg Müller
It seems like this issue has already been raised over a year ago?

https://github.com/jackaudio/jack2/issues/332

> If you're able to build a debug version and run that in a debugger
> to show the exact location where the crash occurs, even better.
As the latest released binary of JACK (1.9.11) is two versions behind
the current one (1.9.13), it looks like building for Windows is kind of
a hard task, currently?

I created a small example programm that just calls a single JACK command
and the described issue exists across all Windows SDK 8-10 versions and
platform toolsets v140-142. I can add that info to the GitHub Issue
linked above if you think that this is the right one.


Best, Jörg

Am 05.09.2019 um 14:00 schrieb Christopher Arndt:

> Am 05.09.19 um 13:45 schrieb Jörg Müller:
>> Is there anything that can be done to fix the Windows version of JACK?
> The best would probably to open a ticket in the jack2 github issue
> tracker here:
>
> https://github.com/jackaudio/jack2/issues
>
> Attach a small example program, which exhibits the crash along with
> instructions how you build and run it on windows and any error output
> (maybe some of the programs in the example-clients folder will do the
> job). If you're able to build a debug version and run that in a debugger
> to show the exact location where the crash occurs, even better.
>
> Also include information about your compiler, versions of linked
> libraries etc.
>
>
> Chris
> _______________________________________________
> Jack-Devel mailing list
> [hidden email]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: JACK library on Windows causes crash if used within an ASLR application

Christopher Arndt
Am 05.09.19 um 14:37 schrieb Jörg Müller:
> It seems like this issue has already been raised over a year ago?
>
> https://github.com/jackaudio/jack2/issues/332

Well, that's at least something. As is often the case with Open Source
software, the devs probably do no have a windows build & test
environment set up all the time, so for bugs that only manifest
themselves on Windows, it often takes a high amount of co-operation by
the reporter to get to the bottom of the problem - or a willingness to
pester the devs until they do something about it.

> As the latest released binary of JACK (1.9.11) is two versions behind
> the current one (1.9.13), it looks like building for Windows is kind of
> a hard task, currently?

Afaics, the current Jack2 release is still 1.9.12. Since its release
notes state "Fix windows build issues" I wonder why no Windows build is
available on the download page (http://jackaudio.org/downloads/).

Has anybody confirmed the issue with a windows build of release 19.1.12
or the latest git revision?


Chris
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: JACK library on Windows causes crash if used within an ASLR application

Christopher Arndt
Am 05.09.19 um 14:53 schrieb Christopher Arndt:
> Afaics, the current Jack2 release is still 1.9.12. Since its release
> notes state "Fix windows build issues" I wonder why no Windows build is
> available on the download page (http://jackaudio.org/downloads/).

This comment on an issue about building on Windows might help:

https://github.com/jackaudio/jack2/issues/488#issuecomment-526584196


Chris
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: JACK library on Windows causes crash if used within an ASLR application

Jörg Müller
> This comment on an issue about building on Windows might help:
>
> https://github.com/jackaudio/jack2/issues/488#issuecomment-526584196
That sounds promising, indeed. That person already seems to have made a
PR on the GitHub project: https://github.com/jackaudio/jack2/pull/495

Is somebody of the JACK devs aware of that PR and looking into it?

I'm unfamiliar with JACK's source code and it's MinGW/waf toolchain. If
somebody told me how to enable ASLR in the linker of JACK's build
process, I can test and try that with the changes from the PR linked
above on Windows.

Best, Jörg

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: JACK library on Windows causes crash if used within an ASLR application

Filipe Coelho
On 05.09.2019 14:18, Jörg Müller wrote:
> Is somebody of the JACK devs aware of that PR and looking into it?

I am aware of it, but am not doing any work on Windows related things at
the moment.
Fixing the last details about metadata comes first, so 1.9.13 can be
released.
And afterwards there is importing internal clients and latest things
from jack1, so we can have feature parity.
Only after this (at least on my side) I will begin to take a look at
win/macos issues.

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: JACK library on Windows causes crash if used within an ASLR application

Mechamania
Hi guys,

So if I understand correctly, JACK does not work with Windows 10 if ASLR
is enabled.

What is ASLR? Is this the Address Space Layout Randomization feature of
Windows? If so, Can it be disabled so that we can use JACK on Windows 10?

If we write our own application to connect to JACK, will that be a
problem too?


On 05/09/2019 15:45, Filipe Coelho wrote:

> On 05.09.2019 14:18, Jörg Müller wrote:
>> Is somebody of the JACK devs aware of that PR and looking into it?
>
> I am aware of it, but am not doing any work on Windows related things
> at the moment.
> Fixing the last details about metadata comes first, so 1.9.13 can be
> released.
> And afterwards there is importing internal clients and latest things
> from jack1, so we can have feature parity.
> Only after this (at least on my side) I will begin to take a look at
> win/macos issues.
>
> _______________________________________________
> Jack-Devel mailing list
> [hidden email]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: JACK library on Windows causes crash if used within an ASLR application

Jörg Müller
> So if I understand correctly, JACK does not work with Windows 10 if ASLR
> is enabled.
Slightly different. If you build an application that has ASLR enabled in
it's linker settings and use the JACK library, then your app will crash
on Windows 10 with JACK 1.9.11. Note, that linker setting is the default
since VS2012 and has become the norm for a lot of applications these
days. This also includes software trying to access the JACK ASIO driver,
so the crash extends to applications not using the JACK library at all
during compile-time.

> What is ASLR? Is this the Address Space Layout Randomization feature of
> Windows? If so, Can it be disabled so that we can use JACK on Windows 10?
Yes, you can disable this at the system level. But since it is a
security feature, it is highly advised against doing this. Also, a
developer should not advise the end user to make such modifications.

> If we write our own application to connect to JACK, will that be a
> problem too?
Currently, you can simply disable ASLR in the linker settings of your
software. The issue with the current situation - the JACK library
forcing a developer to disable this setting in it's own software - is
that you are not always in control of that. For instance, I'm developing
a JACK client that is used in a popular game engine (Unity). How that
game engine is built is beyond my control.

Apart from that, a library like JACK should not force you to disable
common security features.


Am 08.09.2019 um 17:11 schrieb Mechamania:

> Hi guys,
>
> So if I understand correctly, JACK does not work with Windows 10 if ASLR
> is enabled.
>
> What is ASLR? Is this the Address Space Layout Randomization feature of
> Windows? If so, Can it be disabled so that we can use JACK on Windows 10?
>
> If we write our own application to connect to JACK, will that be a
> problem too?
>
>
> On 05/09/2019 15:45, Filipe Coelho wrote:
>> On 05.09.2019 14:18, Jörg Müller wrote:
>>> Is somebody of the JACK devs aware of that PR and looking into it?
>> I am aware of it, but am not doing any work on Windows related things
>> at the moment.
>> Fixing the last details about metadata comes first, so 1.9.13 can be
>> released.
>> And afterwards there is importing internal clients and latest things
>> from jack1, so we can have feature parity.
>> Only after this (at least on my side) I will begin to take a look at
>> win/macos issues.
>>
>> _______________________________________________
>> Jack-Devel mailing list
>> [hidden email]
>> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
> _______________________________________________
> Jack-Devel mailing list
> [hidden email]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org