Commit afcb9a4
committed
netfilter: ctnetlink: remove refcounting in expectation dumpers
JIRA: https://issues.redhat.com/browse/RHEL-115630
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 e427033 commit afcb9a4
1 file changed
+17
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3155 | 3155 | | |
3156 | 3156 | | |
3157 | 3157 | | |
3158 | | - | |
| 3158 | + | |
| 3159 | + | |
3159 | 3160 | | |
3160 | | - | |
3161 | | - | |
3162 | | - | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
3163 | 3167 | | |
3164 | 3168 | | |
3165 | 3169 | | |
3166 | 3170 | | |
3167 | 3171 | | |
3168 | 3172 | | |
3169 | | - | |
3170 | 3173 | | |
3171 | 3174 | | |
| 3175 | + | |
| 3176 | + | |
3172 | 3177 | | |
3173 | 3178 | | |
3174 | | - | |
3175 | 3179 | | |
3176 | 3180 | | |
3177 | 3181 | | |
| |||
3183 | 3187 | | |
3184 | 3188 | | |
3185 | 3189 | | |
3186 | | - | |
| 3190 | + | |
3187 | 3191 | | |
3188 | 3192 | | |
3189 | 3193 | | |
| |||
3192 | 3196 | | |
3193 | 3197 | | |
3194 | 3198 | | |
3195 | | - | |
3196 | | - | |
3197 | | - | |
| 3199 | + | |
3198 | 3200 | | |
3199 | 3201 | | |
3200 | 3202 | | |
| |||
3205 | 3207 | | |
3206 | 3208 | | |
3207 | 3209 | | |
3208 | | - | |
3209 | | - | |
3210 | | - | |
3211 | 3210 | | |
3212 | 3211 | | |
3213 | 3212 | | |
3214 | 3213 | | |
3215 | 3214 | | |
3216 | 3215 | | |
3217 | | - | |
3218 | 3216 | | |
3219 | 3217 | | |
3220 | 3218 | | |
3221 | 3219 | | |
| 3220 | + | |
| 3221 | + | |
3222 | 3222 | | |
3223 | 3223 | | |
3224 | 3224 | | |
3225 | 3225 | | |
3226 | 3226 | | |
3227 | | - | |
| 3227 | + | |
3228 | 3228 | | |
3229 | 3229 | | |
3230 | 3230 | | |
3231 | 3231 | | |
3232 | 3232 | | |
3233 | | - | |
| 3233 | + | |
3234 | 3234 | | |
3235 | 3235 | | |
3236 | 3236 | | |
3237 | 3237 | | |
3238 | 3238 | | |
3239 | 3239 | | |
3240 | 3240 | | |
3241 | | - | |
3242 | | - | |
3243 | | - | |
| 3241 | + | |
3244 | 3242 | | |
3245 | 3243 | | |
3246 | 3244 | | |
| |||
3251 | 3249 | | |
3252 | 3250 | | |
3253 | 3251 | | |
3254 | | - | |
3255 | | - | |
3256 | | - | |
3257 | 3252 | | |
3258 | 3253 | | |
3259 | 3254 | | |
| |||
3272 | 3267 | | |
3273 | 3268 | | |
3274 | 3269 | | |
3275 | | - | |
3276 | 3270 | | |
3277 | 3271 | | |
3278 | 3272 | | |
| |||
3322 | 3316 | | |
3323 | 3317 | | |
3324 | 3318 | | |
3325 | | - | |
3326 | 3319 | | |
3327 | 3320 | | |
3328 | 3321 | | |
| |||
0 commit comments