diff mbox series

[master] protobuf: Remove embedded runpath

Message ID 20251113053608.809770-1-nikhil.r@bmwtechworks.in
State Under Review
Headers show
Series [master] protobuf: Remove embedded runpath | expand

Commit Message

Nikhil R Nov. 13, 2025, 5:36 a.m. UTC
Remove the runpath embedded in libprotobuf.so.31.1.0 by setting
CMAKE_SKIP_INSTALL_RPATH=ON
CMAKE_SKIP_BUILD_RPATH=ON

The embedded runpath can easily enable an attacker
to get malicious code executed if there is some issue
with the file permissions at the specified location.

Signed-off-by: Nikhil R <nikhil.r@bmwtechworks.in>
Signed-off-by: Sana Kazi <Sana.Kazi@bmwtechworks.in>
---
 meta-oe/recipes-devtools/protobuf/protobuf_6.31.1.bb | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_6.31.1.bb b/meta-oe/recipes-devtools/protobuf/protobuf_6.31.1.bb
index 90be1179aa..7479574d93 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf_6.31.1.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf_6.31.1.bb
@@ -42,6 +42,8 @@  EXTRA_OECMAKE += "\
     -Dprotobuf_BUILD_EXAMPLES=OFF \
     -Dprotobuf_ABSL_PROVIDER="package" \
     -Dprotobuf_JSONCPP_PROVIDER="package" \
+    -DCMAKE_SKIP_INSTALL_RPATH=ON  \
+    -DCMAKE_SKIP_BUILD_RPATH=ON \
 "
 
 TEST_SRC_DIR = "examples"