Re: rpc.mountd crashes when extensively using netgroups

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Stefan Walter <stefan.walter@...>
Cc: Steve Dickson <SteveD@...>, <linux-kernel@...>
Date: Thursday, August 2, 2007 - 10:40 pm

Hi,


On Thu, 2 Aug 2007, Stefan Walter wrote:


Yup, the snprintf() in the patch would've truncated the input string.

Steve (D), you should check the return of snprintf() and compare against
the size specified (NFSCLNT_IDMAX+1) and do a graceful cleanup + print
an error message to the user, when detecting truncation of input:


err = snprintf(my_client.m_hostname, (NFSCLNT_IDMAX+1), "%s", *n?n:"DEFAULT");
if (err >= (NFSCLNT_IDMAX+1)) {
	printf("too large input string ...\n");
	/* cleanups and graceful exit */
}


Sorry, I don't have rpc.mountd sources nearby, so cannot make a patch
myself (I'm an exclusively kernel guy :-)


Thanks,
Satyam
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
rpc.mountd crashes when extensively using netgroups, Stefan Walter, (Mon Jul 30, 8:55 am)
Re: rpc.mountd crashes when extensively using netgroups, J. Bruce Fields, (Tue Jul 31, 10:48 am)
Re: rpc.mountd crashes when extensively using netgroups, Steve Dickson, (Tue Jul 31, 9:59 am)
Re: rpc.mountd crashes when extensively using netgroups, Stefan Walter, (Thu Aug 2, 5:04 am)
Re: rpc.mountd crashes when extensively using netgroups, Satyam Sharma, (Thu Aug 2, 10:40 pm)
Re: rpc.mountd crashes when extensively using netgroups, Steve Dickson, (Fri Aug 3, 10:51 am)