From: Gao Feng <redacted>
When memory is exhausted, nfct_seqadj_ext_add may fail to add the seqadj
extension. But the function nf_ct_seqadj_init doesn't check if get valid
seqadj pointer by the nfct_seqadj, while other functions perform the
sanity check.
So the system would be panic when nfct_seqadj_ext_add failed.
Signed-off-by: Gao Feng <redacted>
---
v2: Remove the unnessary seqadj check in nf_ct_seq_adjust
v1: Inital patch
net/netfilter/nf_conntrack_seqadj.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
From: Gao Feng <redacted>
When memory is exhausted, nfct_seqadj_ext_add may fail to add the seqadj
extension. But the function nf_ct_seqadj_init doesn't check if get valid
seqadj pointer by the nfct_seqadj, while other functions perform the
sanity check.
So the system would be panic when nfct_seqadj_ext_add failed.
Signed-off-by: Gao Feng <redacted>
Not sure this WARN() is really needed, I would remove it (since its most
likely only missing due to memory shortage).
Other than that, this looks good.
Hi Florian,
On Fri, Sep 2, 2016 at 2:59 PM, Florian Westphal [off-list ref] wrote:
fgao@ikuai8.com [off-list ref] wrote:
quoted
From: Gao Feng <redacted>
When memory is exhausted, nfct_seqadj_ext_add may fail to add the seqadj
extension. But the function nf_ct_seqadj_init doesn't check if get valid
seqadj pointer by the nfct_seqadj, while other functions perform the
sanity check.
So the system would be panic when nfct_seqadj_ext_add failed.
Signed-off-by: Gao Feng <redacted>
Not sure this WARN() is really needed, I would remove it (since its most
likely only missing due to memory shortage).
Other than that, this looks good.
I prefer to keep the warning, although it only happens caused by mem
shortage now.
But it would give the accurate description, if the nfct_seqadj_ext_add
was lost when new features were depending on synadj.
Best Regards
Feng