On Tue, Apr 11, 2023 at 04:43:04PM +0800, Siegfried Levin wrote:
> I checked the core dump again. There is still an error on Ring 0.16.20.

Yes, that's expected. If you read my mail again, I told you to use the
patched source in /usr/local/share/ring-0.16.20 from the rust-ring
package, not simply ring 0.16.20. Once again: if Cargo.toml contains

[dependencies]
...
ring = "^0.16"
...

or similar, remove the ring line from [dependencies] and add a new section

[dependencies.ring]
version = "^0.16"
path = "/usr/local/share/ring-0.16.20"

Or you can follow Laurie Tratt's recpie.

> Where can I know more about the protection introduced in 7.3 in case that I 
> need to report this on GitHub? Thanks.

I don't think it's going to be useful to report this on github. I will
try to upstream the patches when I will find time to do so. It's a bit
of a tricky patchset since ring uses assembly from BoringSSL and targets
various platforms I don't have easy access to, so I can't upstream the
patches as they currently are in the port.

> Reading symbols from /usr/libexec/ld.so...Error while reading shared library 
> symbols:
> Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in 
> module /usr/libexec/ld.so]
> #0  GFp_sha512_block_data_order_avx () at 
> /mnt/warehouse/home/git/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/sha512-x86_64-elf.S:1881
> 1881          vpaddq  -128(%rbp),%xmm0,%xmm8

Yes, as expected.

> 
> > On Apr 11, 2023, at 02:54, Theo Buehler <t...@theobuehler.org> wrote:
> > 
> > 
> >> 
> >> Thanks. Actually that’s what I did. Rust package was updated by
> >> “pkg_add -u rust” and then “cargo build —release” rebuilds the
> >> projects. However, when I ran it, it crashed because of segment fault.
> >> It no longer passes the tests as well,  “invalid memory reference” was
> >> returned.
> > 
> > Without seeing a backtrace it is difficult to tell.
> > 
> > Another issue could be that you use things depending on the ring crate
> > whose assembly isn't compatible with the new x-only protection on modern
> > amd64 machines.
> > 
> > If so, you will need to 
> > 
> > # pkg_add rust-ring
> > 
> > and replace lines like this
> > 
> > ring         = "^0.16"
> > 
> > with something like this in Cargo.toml:
> > 
> > [dependencies.ring]
> > version         = "^0.16"
> > path = "/usr/local/share/ring-0.16.20"

Reply via email to