Commit 1b4e27f
committed
netfilter: ctnetlink: remove refcounting in expectation dumpers
JIRA: https://issues.redhat.com/browse/RHEL-115582
Upstream Status: commit 1492e3d
commit 1492e3d
Author: Florian Westphal <fw@strlen.de>
Date: Fri Aug 1 17:25:09 2025 +0200
netfilter: ctnetlink: remove refcounting in expectation dumpers
Same pattern as previous patch: do not keep the expectation object
alive via refcount, only store a cookie value and then use that
as the skip hint for dump resumption.
AFAICS this has the same issue as the one resolved in the conntrack
dumper, when we do
if (!refcount_inc_not_zero(&exp->use))
to increment the refcount, there is a chance that exp == last, which
causes a double-increment of the refcount and subsequent memory leak.
Fixes: cf6994c ("[NETFILTER]: nf_conntrack_netlink: sync expectation dumping with conntrack table dumping")
Fixes: e844a92 ("netfilter: ctnetlink: allow to dump expectation per master conntrack")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fwestpha@redhat.com>1 parent 33ecc6c commit 1b4e27f
1 file changed
+17
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3171 | 3171 | | |
3172 | 3172 | | |
3173 | 3173 | | |
3174 | | - | |
| 3174 | + | |
| 3175 | + | |
3175 | 3176 | | |
3176 | | - | |
3177 | | - | |
3178 | | - | |
| 3177 | + | |
| 3178 | + | |
| 3179 | + | |
| 3180 | + | |
| 3181 | + | |
| 3182 | + | |
3179 | 3183 | | |
3180 | 3184 | | |
3181 | 3185 | | |
3182 | 3186 | | |
3183 | 3187 | | |
3184 | 3188 | | |
3185 | | - | |
3186 | 3189 | | |
3187 | 3190 | | |
| 3191 | + | |
| 3192 | + | |
3188 | 3193 | | |
3189 | 3194 | | |
3190 | | - | |
3191 | 3195 | | |
3192 | 3196 | | |
3193 | 3197 | | |
| |||
3199 | 3203 | | |
3200 | 3204 | | |
3201 | 3205 | | |
3202 | | - | |
| 3206 | + | |
3203 | 3207 | | |
3204 | 3208 | | |
3205 | 3209 | | |
| |||
3208 | 3212 | | |
3209 | 3213 | | |
3210 | 3214 | | |
3211 | | - | |
3212 | | - | |
3213 | | - | |
| 3215 | + | |
3214 | 3216 | | |
3215 | 3217 | | |
3216 | 3218 | | |
| |||
3221 | 3223 | | |
3222 | 3224 | | |
3223 | 3225 | | |
3224 | | - | |
3225 | | - | |
3226 | | - | |
3227 | 3226 | | |
3228 | 3227 | | |
3229 | 3228 | | |
3230 | 3229 | | |
3231 | 3230 | | |
3232 | 3231 | | |
3233 | | - | |
3234 | 3232 | | |
3235 | 3233 | | |
3236 | 3234 | | |
3237 | 3235 | | |
| 3236 | + | |
| 3237 | + | |
3238 | 3238 | | |
3239 | 3239 | | |
3240 | 3240 | | |
3241 | 3241 | | |
3242 | 3242 | | |
3243 | | - | |
| 3243 | + | |
3244 | 3244 | | |
3245 | 3245 | | |
3246 | 3246 | | |
3247 | 3247 | | |
3248 | 3248 | | |
3249 | | - | |
| 3249 | + | |
3250 | 3250 | | |
3251 | 3251 | | |
3252 | 3252 | | |
3253 | 3253 | | |
3254 | 3254 | | |
3255 | 3255 | | |
3256 | 3256 | | |
3257 | | - | |
3258 | | - | |
3259 | | - | |
| 3257 | + | |
3260 | 3258 | | |
3261 | 3259 | | |
3262 | 3260 | | |
| |||
3267 | 3265 | | |
3268 | 3266 | | |
3269 | 3267 | | |
3270 | | - | |
3271 | | - | |
3272 | | - | |
3273 | 3268 | | |
3274 | 3269 | | |
3275 | 3270 | | |
| |||
3288 | 3283 | | |
3289 | 3284 | | |
3290 | 3285 | | |
3291 | | - | |
3292 | 3286 | | |
3293 | 3287 | | |
3294 | 3288 | | |
| |||
3338 | 3332 | | |
3339 | 3333 | | |
3340 | 3334 | | |
3341 | | - | |
3342 | 3335 | | |
3343 | 3336 | | |
3344 | 3337 | | |
| |||
0 commit comments