Package: ifd-gempc Version: 1.0.6-6 Severity: important Tags: patch Dear Maintainer,
The hardening flags are missing in a few places because the build system ignores them. The attached patch fixes the issue, if possible it should be sent upstream. To check if all flags were correctly enabled you can use `hardening-check` from the hardening-includes package and check the build log (hardening-check doesn't catch everything): $ hardening-check /usr/lib/pcsc/drivers/ifd-GemPC430.bundle/Contents/Linux/libGemPC430.so.1.0.6 /usr/lib/pcsc/drivers/serial/libGemPC410.so.1.0.6 /usr/lib/pcsc/drivers/ifd-GemPC430.bundle/Contents/Linux/libGemPC430.so.1.0.6: Position Independent Executable: no, regular shared library (ignored) Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: yes Immediate binding: no not found! /usr/lib/pcsc/drivers/serial/libGemPC410.so.1.0.6: Position Independent Executable: no, regular shared library (ignored) Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: yes Immediate binding: no not found! (Position Independent Executable and Immediate binding is not enabled by default.) Use find -type f \( -executable -o -name \*.so\* \) -exec hardening-check {} + on the build result to check all files. Regards, Simon [1]: https://wiki.debian.org/ReleaseGoals/SecurityHardeningBuildFlags [2]: https://wiki.debian.org/HardeningWalkthrough [3]: https://wiki.debian.org/Hardening -- + privacy is necessary + using gnupg http://gnupg.org + public key id: 0x92FEFDB7E44C32F9
Description: Use build flags from environment (dpkg-buildflags). Necessary for hardening flags. Author: Simon Ruderich <si...@ruderich.org> Last-Update: 2012-04-07 --- ifd-gempc-1.0.6.orig/GemPC410/Makefile +++ ifd-gempc-1.0.6/GemPC410/Makefile @@ -33,14 +33,14 @@ common: $(MAKE) -C ../common CFLAGS="$(CFLAGS) -I../GemPC410" all ifd-GemPC410: common $(targets) main.o ../common/GCdebug.o - $(CC) -o $@ $(targets) $(common_targets) main.o ../common/GCdebug.o + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(targets) $(common_targets) main.o ../common/GCdebug.o resetGemPC410: resetGemPC410.o - $(CC) -o $@ $^ + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ libGemPC410.so: common $(targets) rm -f $@ - $(CC) -shared $(LDFLAGS) $(targets) $(common_targets) -o $@ + $(CC) -shared $(CFLAGS) $(LDFLAGS) $(targets) $(common_targets) -o $@ chmod -x $@ mv $@ $@.$(version) --- ifd-gempc-1.0.6.orig/GemPC430/Makefile +++ ifd-gempc-1.0.6/GemPC430/Makefile @@ -35,13 +35,13 @@ common: $(MAKE) -C ../common CFLAGS="$(CFLAGS) -I../GemPC430" all ifd-GemPC430: common $(targets) main.o ../common/GCdebug.o - $(CC) $(LDFLAGS) -o $@ $(targets) $(common_targets) main.o ../common/GCdebug.o $(LIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(targets) $(common_targets) main.o ../common/GCdebug.o $(LIBS) libGemPC430.so: common $(targets) - $(CC) -shared $(LDFLAGS) -o $@ $(targets) $(common_targets) $(LIBS) + $(CC) -shared $(CFLAGS) $(LDFLAGS) -o $@ $(targets) $(common_targets) $(LIBS) main.o: ../GemPC410/main.c - $(CC) $(CFLAGS) -c -o $@ $^ + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -c -o $@ $^ clean: rm -f .dependencies
signature.asc
Description: Digital signature