Giter VIP home page Giter VIP logo

Comments (15)

aabc avatar aabc commented on May 22, 2024

Что это за ядро и откуда оно взялось?

from ipt-netflow.

aabc avatar aabc commented on May 22, 2024

Покажите /boot/config-4.1.0-0.bpo.2-amd64 от этого ядра, если не трудно. Получается, что в Debian-е определен символ CONFIG_GRKERNSEC из Gentoo.

from ipt-netflow.

hotid avatar hotid commented on May 22, 2024

Дебиановское из jessie-backports.

 cat /boot/config-4.1.0-0.bpo.2-amd64 | grep GRKERNSEC
CONFIG_GRKERNSEC=y
CONFIG_GRKERNSEC_PERF_HARDEN=y

from ipt-netflow.

hotid avatar hotid commented on May 22, 2024

https://packages.debian.org/jessie-backports/linux-image-4.1.0-0.bpo.2-amd64

from ipt-netflow.

aabc avatar aabc commented on May 22, 2024

Спасибо. То есть Дебиан частично влючил патч от Grsecurity, но не включил часть с ctl_table_no_const. Надо разбираться как это теперь правильно заifdefить...

from ipt-netflow.

hotid avatar hotid commented on May 22, 2024
diff --git a/compat.h b/compat.h
index dd3cfc6..a140ce8 100644
--- a/compat.h
+++ b/compat.h
@@ -79,7 +79,7 @@ union nf_inet_addr {
 #  define ctl_table struct ctl_table
 # endif

-# ifndef CONFIG_GRKERNSEC
+# ifndef ctl_table_no_const
 #  define ctl_table_no_const ctl_table
 # endif
 #endif

Не?

from ipt-netflow.

aabc avatar aabc commented on May 22, 2024

https://www.grsecurity.net/test/grsecurity-3.1-4.1.7-201509201149.patch

typedef struct ctl_table __no_const ctl_table_no_const;

Надо смотреть что именно включил Дебиан.

from ipt-netflow.

hotid avatar hotid commented on May 22, 2024
  * security: Apply and enable GRKERNSEC_PERF_HARDEN feature from Grsecurity,
    disabling use of perf_event_open() by unprivileged users by default
    (sysctl: kernel.perf_event_paranoid)

Патчи: http://igorsd.ru/gr/

from ipt-netflow.

hotid avatar hotid commented on May 22, 2024

Судя по всему - там только GRKERNSEC_PERF_HARDEN добавили.

from ipt-netflow.

aabc avatar aabc commented on May 22, 2024

Спрашвается зачем они сделали CONFIG_GRKERNSEC, если там только GRKERNSEC_PERF_HARDEN. Вот и не понятно какой ifdef теперь делать...

from ipt-netflow.

hotid avatar hotid commented on May 22, 2024

А чем плох # ifndef ctl_table_no_const?

from ipt-netflow.

aabc avatar aabc commented on May 22, 2024

А в чём его смысл? ctl_table_no_const никогда не определен, это не define.

from ipt-netflow.

aabc avatar aabc commented on May 22, 2024

Дебиановцы безответственно поступили включив патч в таком виде, что его не отличить от реального Grsecurity. Я поискал дефайны по которым бы можно было отличить реальный Grsecurity, они есть, если делать #include <linux/grsecurity.h>, но чтоб его сделать надо знать, что Grsecurity есть, а как раз это и неизвестно. 😞

Остаётся поискать что-нибудь чтоб отличить ядро дебиана.

from ipt-netflow.

hotid avatar hotid commented on May 22, 2024

Да, чёт не подумал.
Может так?

diff --git a/compat.h b/compat.h
index dd3cfc6..4a7b640 100644
--- a/compat.h
+++ b/compat.h
@@ -79,7 +79,7 @@ union nf_inet_addr {
 #  define ctl_table struct ctl_table
 # endif

-# ifndef CONFIG_GRKERNSEC
+# ifndef HAVE_GRSECURITY_H
 #  define ctl_table_no_const ctl_table
 # endif
 #endif
diff --git a/configure b/configure
index c6c5593..1278c61 100755
--- a/configure
+++ b/configure
@@ -453,6 +453,7 @@ kernel_check_include() {

 kernel_check_features() {
   kernel_check_include include/linux/llist.h -DHAVE_LLIST
+  kernel_check_include include/linux/grsecurity.h -DHAVE_GRSECURITY_H
 }

 snmp_check() {

from ipt-netflow.

aabc avatar aabc commented on May 22, 2024

Да, через configure нормальный вариант.

from ipt-netflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.