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

173 #155

Closed
wanghenshui opened this issue Nov 18, 2024 · 6 comments
Closed

173 #155

wanghenshui opened this issue Nov 18, 2024 · 6 comments

Comments

@wanghenshui
Copy link
Owner

No description provided.

@wanghenshui
Copy link
Owner Author

Some Of My Experience About Linking C/C++ On Linux
符号链接问题 https://coyorkdow.github.io/linking/2024/11/17/C++_linking_linux.html
简单来说,未定义/重定义

@wanghenshui
Copy link
Owner Author

https://libcxx.llvm.org/Hardening.html 加固详细介绍

https://security.googleblog.com/2024/11/retrofitting-spatial-safety-to-hundreds.html

https://bughunters.google.com/blog/6368559657254912/llvm-s-rfc-c-buffer-hardening-at-google

加固只有0.3% 1%性能损失?

While these new runtime safety checks improve security, they add additional runtime overhead and can negatively impact performance. We studied the performance degradation for Google workloads and Feedback Direct Optimization (FDO) proved to be effective in minimizing it. As an example, enabling the hardened libc++, without any FDO, in a representative Google fleet workload added a ~0.9% queries per second (QPS) regression and a ~2.5% latency regression. When properly using FDO, we measured a ~65% reduction in QPS overhead and a ~75% reduction in latency overhead.

存在问题

加固覆盖的还是有遗漏,目前还在修复
有的加固存在ABI影响,不方便推广

@mapleFU
Copy link

mapleFU commented Nov 19, 2024

Some Of My Experience About Linking C/C++ On Linux 符号链接问题 https://coyorkdow.github.io/linking/2024/11/17/C++_linking_linux.html 简单来说,未定义/重定义

(无关)想到这篇文章:问题排查:C++ exception with description “getrandom“ thrown in the test body - 大家好大家吃了吗的文章 - 知乎
https://zhuanlan.zhihu.com/p/5392960438

@wanghenshui
Copy link
Owner Author

wanghenshui commented Nov 21, 2024

any https://godbolt.org/z/Kx6hn9ccM

类型擦除带来的new delete开销不小

但去掉typeinfo/sso通过类型擦除带来的get收益也不小

构造慢的原因?

get快的原因?

@wanghenshui
Copy link
Owner Author

@wanghenshui
Copy link
Owner Author

wanghenshui commented Nov 21, 2024

https://yossarian.net/til/post/some-surprising-code-execution-sources-in-bash

bash -eq 存在安全问题,慎重 (shellcheck能分析出来吗?)不能 koalaman/shellcheck/issues/3088

function guess() {
  num="${1}"
  if [[ "${num}" -eq 42 ]]
  then
    echo "Correct"
  else
    echo "Wrong"
  fi
}
$ guess 'a[$(cat /etc/passwd > /tmp/pwned)] + 42'
Correct
$ cat /tmp/pwned

test -v同理

$ [[ -v 'x[$(cat /etc/passwd > /tmp/pwned)]' ]]
$ cat /tmp/pwned

wanghenshui added a commit that referenced this issue Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants