lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202402131603.E953E2CF@keescook>
Date: Tue, 13 Feb 2024 16:03:37 -0800
From: coverity-bot <keescook@...omium.org>
To: Kent Overstreet <kent.overstreet@...ux.dev>
Cc: linux-bcachefs@...r.kernel.org, linux-kernel@...r.kernel.org,
	"Darrick J. Wong" <djwong@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Brian Foster <bfoster@...hat.com>,
	"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
	linux-next@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Coverity: darray_vprintf(): API usage errors

Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20240213 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:

  Mon Feb 12 13:55:16 2024 -0500
    ead021e0fe5b ("thread_with_file: Lift from bcachefs")

Coverity reported the following:

*** CID 1583634:  API usage errors  (VARARGS)
lib/thread_with_file.c:123 in darray_vprintf()
117     		va_copy(args2, args);
118
119     		len = vsnprintf(out->data + out->nr, darray_room(*out), fmt, args2);
120     	} while (len + 1 > darray_room(*out) && !darray_make_room_gfp(out, len + 1, gfp));
121
122     	out->nr += min(len, darray_room(*out));
vvv     CID 1583634:  API usage errors  (VARARGS)
vvv     "va_end" was not called for "args2".
123     }
124
125     void stdio_redirect_vprintf(struct stdio_redirect *stdio, bool nonblocking,
126     			    const char *fmt, va_list args)
127     {
128     	struct stdio_buf *buf = &stdio->output;

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <keescook+coverity-bot@...omium.org>
Addresses-Coverity-ID: 1583634 ("API usage errors")
Fixes: ead021e0fe5b ("thread_with_file: Lift from bcachefs")

Thanks for your attention!

-- 
Coverity-bot

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ