From: Scott Mayhew <smayhew@redhat.com>
To: steved@redhat.com
Cc: linux-nfs@vger.kernel.org
Subject: [rpcbind PATCH 1/6] rpcbind: only log failures in check_callit() if connection logging is enabled
Date: Thu, 3 Sep 2026 13:42:40 -0400 [thread overview]
Message-ID: <20260903174245.1213147-2-smayhew@redhat.com> (raw)
In-Reply-To: <20260903174245.1213147-1-smayhew@redhat.com>
logit() forks a child process to call syslog(). A client can spam
CALLIT/BROADCAST/INDIRECT requests, leading to CPU, scheduler, and PID
pressure. It's better to only log failures from check_callit() if
rpcbind is running with the '-l' option (connection logging).
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
src/security.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/security.c b/src/security.c
index 38967dd..02651d7 100644
--- a/src/security.c
+++ b/src/security.c
@@ -343,11 +343,13 @@ check_callit(SVCXPRT *xprt, struct r_rmtcall_args *args, int versnum /*__unused*
return 1;
deny:
#ifdef LIBWRAP
- logit(deny_severity, sa, args->rmt_proc, args->rmt_prog,
- ": indirect call not allowed");
+ if (verboselog)
+ logit(deny_severity, sa, args->rmt_proc, args->rmt_prog,
+ ": indirect call not allowed");
#else
- logit(LOG_AUTH|LOG_WARNING, sa, args->rmt_proc, args->rmt_prog,
- ": indirect call not allowed");
+ if (verboselog)
+ logit(LOG_AUTH|LOG_WARNING, sa, args->rmt_proc, args->rmt_prog,
+ ": indirect call not allowed");
#endif
return 0;
}
--
2.55.0
next prev parent reply other threads:[~2026-09-03 17:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 17:42 [rpcbind PATCH 0/6] rpcbind: various hardening fixes Scott Mayhew
2026-09-03 17:42 ` Scott Mayhew [this message]
2026-09-03 17:42 ` [rpcbind PATCH 2/6] rpcbind: bound stats lists in rpcbs_getaddr() and rpcbs_rmtcall() Scott Mayhew
2026-09-03 17:42 ` [rpcbind PATCH 3/6] rpcbind: fully disable remote calls when --enable-rmtcalls is unset Scott Mayhew
2026-09-03 17:42 ` [rpcbind PATCH 4/6] rpcbind: restrict RPCBPROC_GETSTAT to loopback callers Scott Mayhew
2026-09-03 17:42 ` [rpcbind PATCH 5/6] rpcbind: check for null netmask in addrmerge() Scott Mayhew
2026-09-03 17:42 ` [rpcbind PATCH 6/6] rpcbind: only free the forward slot if the reply xid matched the request xid Scott Mayhew
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260903174245.1213147-2-smayhew@redhat.com \
--to=smayhew@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=steved@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox