Page MenuHomeFreeBSD

ipfw: Update the pfil mbuf pointer in ipfw_check_frame()
ClosedPublic

Authored by markj on Jun 14 2021, 9:42 PM.
Tags
None
Referenced Files
F132131094: D30764.id90960.diff
Tue, Oct 14, 12:55 AM
F132131093: D30764.id.diff
Tue, Oct 14, 12:55 AM
F132131092: D30764.id90895.diff
Tue, Oct 14, 12:55 AM
F132078013: D30764.diff
Mon, Oct 13, 11:25 AM
Unknown Object (File)
Sat, Oct 11, 1:28 PM
Unknown Object (File)
Sun, Oct 5, 8:42 PM
Unknown Object (File)
Sat, Sep 27, 12:44 AM
Unknown Object (File)
Wed, Sep 24, 12:42 AM

Details

Summary

ipfw_chk() might call m_pullup() and thus can change the mbuf chain
head. In this case, the new chain head has to be returned to the pfil
hook caller.

PR: 256439
Fixes: f355cb3e6
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Jun 14 2021, 9:42 PM

I think we can set *p.m unconditionally, like we do in ipfw_check_packet().

This revision is now accepted and ready to land.Jun 15 2021, 11:21 AM
In D30764#691796, @ae wrote:

I think we can set *p.m unconditionally, like we do in ipfw_check_packet().

p is a union of struct mbuf ** and void *. So wouldn't setting *p.m do the wrong thing if the packet is passed with PFIL_MEMPTR?

p is a union of struct mbuf ** and void *. So wouldn't setting *p.m do the wrong thing if the packet is passed with PFIL_MEMPTR?

You are right.