lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <97fd842e75ef1dd7d78b99441d5654fb9a05e320.camel@redhat.com>
Date:   Wed, 23 Jun 2021 19:19:28 +0200
From:   Paolo Abeni <pabeni@...hat.com>
To:     Pavel Machek <pavel@....cz>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Mat Martineau <mathew.j.martineau@...ux.intel.com>,
        "David S. Miller" <davem@...emloft.net>,
        Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 5.10 038/146] mptcp: do not warn on bad input from the
 network

On Wed, 2021-06-23 at 18:53 +0200, Pavel Machek wrote:
> Hi!
> 
> > > > From: Paolo Abeni <pabeni@...hat.com>
> > > > 
> > > > [ Upstream commit 61e710227e97172355d5f150d5c78c64175d9fb2 ]
> > > > 
> > > > warn_bad_map() produces a kernel WARN on bad input coming
> > > > from the network. Use pr_debug() to avoid spamming the system
> > > > log.
> > > 
> > > So... we switched from WARN _ONCE_ to pr_debug, as many times as we
> > > detect the problem.
> > > 
> > > Should this be pr_debug_once?
> > 
> > Thank you for double checking this!
> > 
> > In the MPTCP code, we use pr_debug() statements as a debug tool, e.g.
> > when enabled, it could print per-packet info with no restriction. 
> > 
> > There are (a few) similar use in the plain TCP code.
> > 
> > pr_debug() is not supposed to be enabled on any production system,
> > while the WARN_ONCE could trigger automated tools for irrelevant
> > network noise.
> 
> Correct me if I'm wrong, but I believe pr_debug will result in
> messages being stored in the dmesg buffer, even on production
> systems.

If DYNAMIC_DEBUG is enabled, and the system administator explicitly
enables the relevant debug message writing suitable data in
/sys/kernel/debug/dynamic_debug/control, yes, the message will be
printed on dmsg.

With DYNAMIC_DEBUG disabled, patching the kernel and defining the DEBUG
macro in the net/mptcp/protocol.c file you will get again the debug
message.

Neither of the above fit productions systems IMHO, and I'm not aware of
other options to trigger the relevant debug message.

I personally have CONFIG_DYNAMIC_DEBUG=y in my kconfig and I enable the
relevant debug message as needed in my devel activity.

Cheers,

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ