Hello,
On Tue, 16 Nov 2010, Hans Schillstrom wrote:
v4 PATCH 1/3
- still the case for pe_data_len=0 and pe_name_len!=0 is
not handled properly as error because we now ignore
pe_name silently
Do you mean that IP_VS_DBG should be replaced ?
if (pe_data_len) {
if (pe_name_len) {
...
} else {
IP_VS_DBG(3, "BACKUP, Invalid PE parameters\n");
return 1;
}
to this ?
...
IP_VS_ERR_RL("BACKUP, Invalid PE parameters\n");
...
No, I'm talking about one missing case:
/* Handle pe data */
if (pe_data_len) {
if (pe_name_len) {
} else {
IP_VS_DBG(3, "BACKUP, Invalid PE parameters\n");
return 1;
}
... kmalloc ...
THIS CASE IS MISSING:
+ } else if (pe_name_len) {
+ IP_VS_DBG(3, "BACKUP, Invalid PE parameters\n");
+ return 1;
}
That is why my first example was a sort of XOR operation:
/* Handle pe data */
if ((pe_data_len != 0) != (pe_name_len != 0)) {
IP_VS_DBG(3, "BACKUP, Invalid PE parameters\n");
return 1;
}
if (!pe_name_len)
return 0;
it means: PE DATA and PE NAME must come together.
because we have 4 possible cases:
1. pe_name_len==0 && pe_data_len==0 => VALID, return 0
2. pe_name_len!=0 && pe_data_len==0 => INVALID, return 1
3. pe_name_len==0 && pe_data_len!=0 => INVALID, return 1
4. pe_name_len!=0 && pe_data_len!=0 => VALID, kmalloc, return 0
Regards
--
Julian Anastasov <ja@xxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
|