Files
rippled/src/ripple
Stefan van Kessel 3dea78d34b fix: asan stack-use-after-scope in soci::use with rvalues (#4676)
Address a stack-use-after-scope issue when using rvalues with
`soci::use`. Replace rvalues with lvalues to ensure the scope extends
beyond the end of the expression.

The issue arises from `soci` taking a reference to the rvalue without
copying its value or extending its lifetime. `soci` references rvalues
in `soci::use_container` and then the address in `soci_use_type`. For
types like `int`, memory access post-lifetime is unlikely to cause
issues. However, for `std::string`, the backing heap memory can be freed
and potentially reused, leading to a potential segmentation fault.

This was detected on x86_64 using clang-15 with asan. asan confirms
resolution of the issue.

Fix #4675
2023-10-03 21:21:36 -07:00
..
2023-09-22 16:17:35 -07:00
2020-02-25 19:21:50 -08:00
2018-03-02 07:37:15 -08:00

Ripple Source Guidelines

Each folder contains a single module following the newest style:

  • One class per header
  • As much implementation hidden as possible
  • All major interfaces are abstract
  • Every class is documented
  • Each module focuses on solving one problem