func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void Compute(OpKernelContext* const context) override {
// node_ids.
const Tensor* node_ids_t;
OP_REQUIRES_OK(context, context->input("node_ids", &node_ids_t));
const auto node_ids = node_ids_t->vec<int32>();
// gradients.
const Tensor* gradients_t;
OP_REQUIRES_OK(context, context->input(... | 1 | [
"CWE-476",
"CWE-369"
] | tensorflow | 5c8c9a8bfe750f9743d0c859bae112060b216f5c | 159,324,346,629,031,800,000,000,000,000,000,000,000 | 64 | Fixing security fixes in boosted trees ops
PiperOrigin-RevId: 405669548
Change-Id: Iae224d240d1779bcc02405c2fff99785644fbd0d |
sctp_disposition_t sctp_sf_do_9_2_shutdown_ack(
struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = (struct sctp_chunk *) arg;
struct sctp_chunk *reply;
/* There are 2 ways of getting... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 271,296,459,080,124,070,000,000,000,000,000,000,000 | 66 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
static int mov_write_stsd_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContext *mov, MOVTrack *track)
{
int64_t pos = avio_tell(pb);
avio_wb32(pb, 0); /* size */
ffio_wfourcc(pb, "stsd");
avio_wb32(pb, 0); /* version & flags */
avio_wb32(pb, 1); /* entry count */
if (track->par->codec_type == ... | 0 | [
"CWE-369"
] | FFmpeg | 2c0e98a0b478284bdff6d7a4062522605a8beae5 | 211,420,363,444,505,100,000,000,000,000,000,000,000 | 19 | avformat/movenc: Write version 2 of audio atom if channels is not known
The version 1 needs the channel count and would divide by 0
Fixes: division by 0
Fixes: fpe_movenc.c_1108_1.ogg
Fixes: fpe_movenc.c_1108_2.ogg
Fixes: fpe_movenc.c_1108_3.wav
Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg>
Signed-off-by: Michael N... |
static void spl_dllist_it_get_current_key(zend_object_iterator *iter, zval *key TSRMLS_DC) /* {{{ */
{
spl_dllist_it *iterator = (spl_dllist_it *)iter;
ZVAL_LONG(key, iterator->traverse_position);
} | 0 | [] | php-src | df78c48354f376cf419d7a97f88ca07d572f00fb | 153,151,892,188,681,380,000,000,000,000,000,000,000 | 6 | Fixed Bug #67538 (SPL Iterators use-after-free) |
static int ntop_stats_get_minute_sampling(lua_State *vm) {
time_t epoch;
string sampling;
int ifid;
NetworkInterface* iface;
StatsManager *sm;
ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__);
if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TNUMBER)) return(CONST_LUA_ERROR);
ifid = lua... | 0 | [
"CWE-254"
] | ntopng | 2e0620be3410f5e22c9aa47e261bc5a12be692c6 | 153,211,758,079,157,470,000,000,000,000,000,000,000 | 27 | Added security fix to avoid escalating privileges to non-privileged users
Many thanks to Dolev Farhi for reporting it |
TIFFWriteDirectoryTagCheckedAscii(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, char* value)
{
assert(sizeof(char)==1);
return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_ASCII,count,count,value));
} | 0 | [
"CWE-617"
] | libtiff | de144fd228e4be8aa484c3caf3d814b6fa88c6d9 | 84,423,207,169,495,450,000,000,000,000,000,000,000 | 5 | TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963 |
int main(int argc, char *argv[])
{
T_ASC_Network *net;
DcmAssociationConfiguration asccfg;
#ifdef HAVE_GUSI_H
/* needed for Macintosh */
GUSISetup(GUSIwithSIOUXSockets);
GUSISetup(GUSIwithInternetSockets);
#endif
#ifdef HAVE_WINSOCK_H
WSAData winSockData;
/* we need at least version 1.1 */
WORD winSoc... | 0 | [
"CWE-264"
] | dcmtk | beaf5a5c24101daeeafa48c375120b16197c9e95 | 324,689,647,457,148,100,000,000,000,000,000,000,000 | 985 | Make sure to handle setuid() return code properly.
In some tools the return value of setuid() is not checked. In the worst
case this could lead to privilege escalation since the process does not
give up its root privileges and continue as root. |
cdf_read_sector(const cdf_info_t *info, void *buf, size_t offs, size_t len,
const cdf_header_t *h, cdf_secid_t id)
{
size_t ss = CDF_SEC_SIZE(h);
size_t pos = CDF_SEC_POS(h, id);
assert(ss == len);
return cdf_read(info, (off_t)pos, ((char *)buf) + offs, len);
} | 0 | [
"CWE-119"
] | file | 1859fdb4e67c49c463c4e0078054335cd46ba295 | 39,430,866,701,628,173,000,000,000,000,000,000,000 | 8 | add more check found by cert's fuzzer. |
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1, free_op2;
zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
zval *expr_ptr;
zval *offset=_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
#if 0 |... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 210,765,279,581,933,140,000,000,000,000,000,000,000 | 78 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
WM_SYMBOL int WildMidi_MasterVolume(uint8_t master_volume) {
if (!WM_Initialized) {
_WM_GLOBAL_ERROR(__FUNCTION__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
return (-1);
}
if (master_volume > 127) {
_WM_GLOBAL_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG,
"(master volu... | 0 | [
"CWE-200",
"CWE-119"
] | wildmidi | 814f31d8eceda8401eb812fc2e94ed143fdad0ab | 255,618,763,103,653,050,000,000,000,000,000,000,000 | 15 | wildmidi_lib.c (WildMidi_Open, WildMidi_OpenBuffer): refuse to proceed if less then 18 bytes of input
Fixes bug #178. |
bjc_put_move_lines(gp_file *file, int lines)
{
bjc_put_command(file, 'n', 2);
bjc_put_hi_lo(file, lines);
} | 0 | [
"CWE-787"
] | ghostpdl | bf72f1a3dd5392ee8291e3b1518a0c2c5dc6ba39 | 71,565,488,686,764,790,000,000,000,000,000,000,000 | 5 | Fix valgrind problems with gdevbjca.c
2 problems here. Firstly, we could access off the end of a row
while looking for runs. Change the indexing to fix this.
Secondly, we could overrun our gamma tables due to unexpectedly
large values. Add some clamping. |
//! Load image from a camera stream, using OpenCV \newinstance.
static CImg<T> get_load_camera(const unsigned int camera_index=0,
const unsigned int capture_width=0, const unsigned int capture_height=0,
const unsigned int skip_frames=0, const... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 257,572,321,409,220,400,000,000,000,000,000,000,000 | 5 | . |
const char *who_am_i(void)
{
if (am_starting_up)
return am_server ? "server" : "client";
return am_sender ? "sender"
: am_generator ? "generator"
: am_receiver ? "receiver"
: "Receiver"; /* pre-forked receiver */
} | 0 | [
"CWE-59"
] | rsync | 962f8b90045ab331fc04c9e65f80f1a53e68243b | 208,676,145,348,886,940,000,000,000,000,000,000,000 | 9 | Complain if an inc-recursive path is not right for its dir.
This ensures that a malicious sender can't use a just-sent
symlink as a trasnfer path. |
GtkTreeModel *bluetooth_client_get_filter_model (BluetoothClient *client,
GtkTreeModelFilterVisibleFunc func,
gpointer data, GDestroyNotify destroy)
{
BluetoothClientPrivate *priv;
GtkTreeModel *model;
g_return_val_if_fail (BLUETOOTH_IS_CLIENT (client), NULL);
priv = BLUETOOTH_CLIENT_GET_PRIVATE(cli... | 0 | [] | gnome-bluetooth | 6b5086d42ea64d46277f3c93b43984f331d12f89 | 115,176,223,090,497,600,000,000,000,000,000,000,000 | 17 | lib: Fix Discoverable being reset when turned off
Work-around race in bluetoothd which would reset the discoverable
flag if a timeout change was requested before discoverable finished
being set to off:
See https://bugzilla.redhat.com/show_bug.cgi?id=1602985 |
int hid_add_device(struct hid_device *hdev)
{
static atomic_t id = ATOMIC_INIT(0);
int ret;
if (WARN_ON(hdev->status & HID_STAT_ADDED))
return -EBUSY;
/* we need to kill them here, otherwise they will stay allocated to
* wait for coming driver */
if (hid_ignore(hdev))
return -ENODEV;
/*
* Check for the... | 0 | [
"CWE-125"
] | linux | 50220dead1650609206efe91f0cc116132d59b3f | 92,212,664,022,446,460,000,000,000,000,000,000,000 | 56 | HID: core: prevent out-of-bound readings
Plugging a Logitech DJ receiver with KASAN activated raises a bunch of
out-of-bound readings.
The fields are allocated up to MAX_USAGE, meaning that potentially, we do
not have enough fields to fit the incoming values.
Add checks and silence KASAN.
Signed-off-by: Benjamin Tis... |
static struct iovec *__io_import_iovec(int rw, struct io_kiocb *req,
struct io_rw_state *s,
unsigned int issue_flags)
{
struct iov_iter *iter = &s->iter;
u8 opcode = req->opcode;
struct iovec *iovec;
void __user *buf;
size_t sqe_len;
ssize_t ret;
if (opcode == IORING_OP_READ_FIXED || opcod... | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 327,480,912,694,704,660,000,000,000,000,000,000,000 | 54 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
}
//! Return a sublist \newinstance.
CImgList<T> get_images(const unsigned int pos0, const unsigned int pos1) const {
if (pos0>pos1 || pos1>=_width)
throw CImgArgumentException(_cimglist_instance
"images(): Specified sub-list indices (%u->%u) are out of bou... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 222,345,842,311,683,270,000,000,000,000,000,000,000 | 10 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
void omg_a_child_died(int /* sig */) {
pid_t pid;
int stat;
while ((pid = waitpid(-1,&stat,WNOHANG)) > 0) { }
::signal(SIGCHLD, omg_a_child_died); /* in case of unreliable signals */
} | 0 | [
"CWE-943",
"CWE-787"
] | newsbeuter | 96e9506ae9e252c548665152d1b8968297128307 | 280,737,428,537,547,160,000,000,000,000,000,000,000 | 6 | Sanitize inputs to bookmark-cmd (#591)
Newsbeuter didn't properly shell-escape the arguments passed to
bookmarking command, which allows a remote attacker to perform remote
code execution by crafting an RSS item whose title and/or URL contain
something interpretable by the shell (most notably subshell
invocations.)
T... |
const CheckAudience* getAudienceChecker() const override { return check_audience_.get(); } | 0 | [
"CWE-303",
"CWE-703"
] | envoy | ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a | 270,625,772,755,090,640,000,000,000,000,000,000,000 | 1 | jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194)
[jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ... |
static inline void txd_clear_parent(struct dma_async_tx_descriptor *txd)
{
txd->parent = NULL;
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 81,631,575,153,624,500,000,000,000,000,000,000,000 | 4 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
static struct bpf_blk *_blk_resize(struct bpf_state *state,
struct bpf_blk *blk,
unsigned int size_add)
{
unsigned int size_adj = (AINC_BLK > size_add ? AINC_BLK : size_add);
struct bpf_instr *new;
if (blk == NULL)
return NULL;
if ((blk->blk_cnt + size_adj) <= blk->blk_alloc)
return blk;
blk->... | 0 | [] | libseccomp | cf5d1538d243fb6f1839db70b69469d3d7e9e077 | 298,670,236,689,769,330,000,000,000,000,000,000,000 | 23 | bpf: pass the correct accumulator state to the next level
We were mistakenly passing the wrong accumulator state (the state at
the start of the instruction block, not at the end) which was causing
us to generate unnecessary load instructions.
Signed-off-by: Paul Moore <paul@paul-moore.com> |
Expr *sqlite3VectorFieldSubexpr(Expr *pVector, int i){
assert( i<sqlite3ExprVectorSize(pVector) );
if( sqlite3ExprIsVector(pVector) ){
assert( pVector->op2==0 || pVector->op==TK_REGISTER );
if( pVector->op==TK_SELECT || pVector->op2==TK_SELECT ){
return pVector->x.pSelect->pEList->a[i].pExpr;
}els... | 0 | [
"CWE-476"
] | sqlite | 57f7ece78410a8aae86aa4625fb7556897db384c | 330,340,291,565,463,930,000,000,000,000,000,000,000 | 12 | Fix a problem that comes up when using generated columns that evaluate to a
constant in an index and then making use of that index in a join.
FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af |
int rm_rf_children(
int fd,
RemoveFlags flags,
const struct stat *root_dev) {
_cleanup_closedir_ DIR *d = NULL;
int ret = 0, r;
assert(fd >= 0);
/* This returns the first error we run into, but nevertheless tries to go on. This closes th... | 1 | [
"CWE-674"
] | systemd | 5b1cf7a9be37e20133c0208005274ce4a5b5c6a1 | 53,986,089,683,753,270,000,000,000,000,000,000,000 | 59 | shared/rm-rf: loop over nested directories instead of instead of recursing
To remove directory structures, we need to remove the innermost items first,
and then recursively remove higher-level directories. We would recursively
descend into directories and invoke rm_rf_children and rm_rm_children_inner.
This is problem... |
pci_set_cfgdata16(struct pci_vdev *dev, int offset, uint16_t val)
{
if ((offset > PCI_REGMAX - 1) || (offset & 1) != 0) {
pr_err("%s: out of range of PCI config space!\n", __func__);
return;
}
*(uint16_t *)(dev->cfgdata + offset) = val;
} | 0 | [
"CWE-617",
"CWE-703"
] | acrn-hypervisor | 2b3dedfb9ba13f15887f22b935d373f36c9a59fa | 105,805,575,603,282,260,000,000,000,000,000,000,000 | 8 | dm: pci: clean up assert() in pci core
Tracked-On: #3252
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com> |
dns__zone_loadpending(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
return (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_LOADPENDING));
} | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 184,198,330,909,342,460,000,000,000,000,000,000,000 | 5 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
static void xen_io_delay(void)
{
} | 0 | [
"CWE-703"
] | linux | 96e8fc5818686d4a1591bb6907e7fdb64ef29884 | 306,475,846,690,041,400,000,000,000,000,000,000,000 | 3 | x86/xen: Use clear_bss() for Xen PV guests
Instead of clearing the bss area in assembly code, use the clear_bss()
function.
This requires to pass the start_info address as parameter to
xen_start_kernel() in order to avoid the xen_start_info being zeroed
again.
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-of... |
static int do_loopback(struct nameidata *nd, char *old_name, int recurse)
{
struct nameidata old_nd;
struct vfsmount *mnt = NULL;
int err = mount_is_safe(nd);
if (err)
return err;
if (!old_name || !*old_name)
return -EINVAL;
err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd);
if (err)
return err;
down_w... | 0 | [
"CWE-269"
] | linux-2.6 | ee6f958291e2a768fd727e7a67badfff0b67711a | 105,127,218,133,340,100,000,000,000,000,000,000,000 | 44 | check privileges before setting mount propagation
There's a missing check for CAP_SYS_ADMIN in do_change_type().
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torva... |
static int MP4_ReadBox_sample_tx3g( stream_t *p_stream, MP4_Box_t *p_box )
{
p_box->i_handler = ATOM_text;
MP4_READBOX_ENTER( MP4_Box_data_sample_text_t );
MP4_GET4BYTES( p_box->data.p_sample_text->i_reserved1 );
MP4_GET2BYTES( p_box->data.p_sample_text->i_reserved2 );
MP4_GET2BYTES( p_box->data.p... | 0 | [
"CWE-120",
"CWE-191",
"CWE-787"
] | vlc | 2e7c7091a61aa5d07e7997b393d821e91f593c39 | 93,297,180,745,786,010,000,000,000,000,000,000,000 | 37 | demux: mp4: fix buffer overflow in parsing of string boxes.
We ensure that pbox->i_size is never smaller than 8 to avoid an
integer underflow in the third argument of the subsequent call to
memcpy. We also make sure no truncation occurs when passing values
derived from the 64 bit integer p_box->i_size to arguments of ... |
static struct sock *x25_alloc_socket(struct net *net, int kern)
{
struct x25_sock *x25;
struct sock *sk = sk_alloc(net, AF_X25, GFP_ATOMIC, &x25_proto, kern);
if (!sk)
goto out;
sock_init_data(NULL, sk);
x25 = x25_sk(sk);
skb_queue_head_init(&x25->ack_queue);
skb_queue_head_init(&x25->fragment_queue);
skb_... | 0 | [] | net | 7781607938c8371d4c2b243527430241c62e39c2 | 149,248,392,287,469,650,000,000,000,000,000,000,000 | 18 | net/x25: Fix null-ptr-deref caused by x25_disconnect
When the link layer is terminating, x25->neighbour will be set to NULL
in x25_disconnect(). As a result, it could cause null-ptr-deref bugs in
x25_sendmsg(),x25_recvmsg() and x25_connect(). One of the bugs is
shown below.
(Thread 1) | (Thread 2... |
ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *method, const char *value)
{
BIGNUM *bn = NULL;
ASN1_INTEGER *aint;
int isneg, ishex;
int ret;
if (value == NULL) {
X509V3err(X509V3_F_S2I_ASN1_INTEGER, X509V3_R_INVALID_NULL_VALUE);
return NULL;
}
bn = BN_new();
if (bn ==... | 0 | [
"CWE-125"
] | openssl | bb4d2ed4091408404e18b3326e3df67848ef63d0 | 259,251,761,145,837,900,000,000,000,000,000,000,000 | 52 | Fix append_ia5 function to not assume NUL terminated strings
ASN.1 strings may not be NUL terminated. Don't assume they are.
CVE-2021-3712
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org> |
static int function_stat_cmp(void *p1, void *p2)
{
struct ftrace_profile *a = p1;
struct ftrace_profile *b = p2;
if (a->counter < b->counter)
return -1;
if (a->counter > b->counter)
return 1;
else
return 0;
} | 0 | [
"CWE-703"
] | linux | 6a76f8c0ab19f215af2a3442870eeb5f0e81998d | 74,272,738,314,081,760,000,000,000,000,000,000,000 | 12 | tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic... |
static BROTLI_INLINE uint16_t BrotliUnalignedRead16(const void* p) {
return *(const uint16_t*)p;
} | 0 | [
"CWE-120"
] | brotli | 223d80cfbec8fd346e32906c732c8ede21f0cea6 | 158,147,187,227,319,880,000,000,000,000,000,000,000 | 3 | Update (#826)
* IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB
* simplify max Huffman table size calculation
* eliminate symbol duplicates (static arrays in .h files)
* minor combing in research/ code |
color_cap_mt_fct (void)
{
/* Our caller just set selected_match_color. */
context_match_color = selected_match_color;
} | 0 | [
"CWE-189"
] | grep | 8fcf61523644df42e1905c81bed26838e0b04f91 | 222,450,664,486,470,300,000,000,000,000,000,000,000 | 5 | grep: fix integer-overflow issues in main program
* NEWS: Document this.
* bootstrap.conf (gnulib_modules): Add inttypes, xstrtoimax.
Remove xstrtoumax.
* src/main.c: Include <inttypes.h>, for INTMAX_MAX, PRIdMAX.
(context_length_arg, prtext, grepbuf, grep, grepfile)
(get_nondigit_option, main):
Use intmax_t, not int,... |
static void auth_request_post_alloc_init(struct auth_request *request, struct event *parent_event)
{
enum log_type level;
request->state = AUTH_REQUEST_STATE_NEW;
auth_request_state_count[AUTH_REQUEST_STATE_NEW]++;
request->refcount = 1;
request->last_access = ioloop_time;
request->session_pid = (pid_t)-1;
reque... | 0 | [
"CWE-284"
] | core | 7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904 | 195,350,005,278,745,860,000,000,000,000,000,000,000 | 23 | auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter
The passdb was wrongly deduplicated in this situation, causing wrong
mechanisms or username_filter setting to be used. This would be a rather
unlikely configuration though.
Fixed by moving mechanisms and username_filter fro... |
*/
void findres(uint32_t by_type, uint32_t by_name, uint32_t res_rva, fmap_t *map, struct cli_exe_section *exe_sections, uint16_t nsections, uint32_t hdr_size, int (*cb)(void *, uint32_t, uint32_t, uint32_t, uint32_t), void *opaque) {
unsigned int err = 0;
uint32_t type, type_offs, name, name_offs, lang, lang_o... | 0 | [
"CWE-703",
"CWE-189"
] | clamav-devel | 270e368b99e93aa5447d46c797c92c3f9f39f375 | 116,064,893,316,570,930,000,000,000,000,000,000,000 | 65 | libclamav: bb #7055 |
init_dwarf_regnames_s390 (void)
{
dwarf_regnames = dwarf_regnames_s390;
dwarf_regnames_count = ARRAY_SIZE (dwarf_regnames_s390);
dwarf_regnames_lookup_func = regname_internal_by_table_only;
} | 0 | [
"CWE-703"
] | binutils-gdb | 695c6dfe7e85006b98c8b746f3fd5f913c94ebff | 331,999,064,846,340,000,000,000,000,000,000,000,000 | 6 | PR29370, infinite loop in display_debug_abbrev
The PR29370 testcase is a fuzzed object file with multiple
.trace_abbrev sections. Multiple .trace_abbrev or .debug_abbrev
sections are not a violation of the DWARF standard. The DWARF5
standard even gives an example of multiple .debug_abbrev sections
contained in group... |
set_terminal_default_colors(int cterm_fg, int cterm_bg)
{
term_default_cterm_fg = cterm_fg - 1;
term_default_cterm_bg = cterm_bg - 1;
} | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 76,215,534,590,290,600,000,000,000,000,000,000,000 | 5 | patch 8.1.0633: crash when out of memory while opening a terminal window
Problem: Crash when out of memory while opening a terminal window.
Solution: Handle out-of-memory more gracefully. |
if(Curl_cert_hostcheck(match_pattern, hostname)) {
infof(data, " subjectAltName: host \"%s\" matched cert's \"%s\"\n",
dispname, match_pattern);
return TRUE;
} | 0 | [
"CWE-290"
] | curl | b09c8ee15771c614c4bf3ddac893cdb12187c844 | 317,160,867,633,784,460,000,000,000,000,000,000,000 | 5 | vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid()
To make sure we set and extract the correct session.
Reported-by: Mingtao Yang
Bug: https://curl.se/docs/CVE-2021-22890.html
CVE-2021-22890 |
int ext4_mark_inode_dirty(handle_t *handle, struct inode *inode)
{
struct ext4_iloc iloc;
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
static unsigned int mnt_count;
int err, ret;
might_sleep();
err = ext4_reserve_inode_write(handle, inode, &iloc);
if (ext4_handle_valid(handle) &&
EXT4_I(inode)->i_extr... | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 136,521,287,691,625,810,000,000,000,000,000,000,000 | 43 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
EbmlElement * EbmlElement::FindNextElement(IOCallback & DataStream, const EbmlSemanticContext & Context, int & UpperLevel,
uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel)
{
int PossibleID_Length = 0;
binary PossibleIdNSize[16];
int PossibleSizeLength;... | 1 | [
"CWE-119",
"CWE-125"
] | libebml | 05beb69ba60acce09f73ed491bb76f332849c3a0 | 269,543,193,877,390,200,000,000,000,000,000,000,000 | 114 | Check the max size to read before actually reading
The size check waas also missing from the length parsing |
struct file *fget_many(unsigned int fd, unsigned int refs)
{
return __fget(fd, FMODE_PATH, refs);
} | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 220,817,472,274,987,300,000,000,000,000,000,000,000 | 4 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
ssize_t rawexpread(off_t a, char *buf, size_t len, CLIENT *client) {
int fhandle;
off_t foffset;
size_t maxbytes;
if(get_filepos(client->export, a, &fhandle, &foffset, &maxbytes))
return -1;
if(maxbytes && len > maxbytes)
len = maxbytes;
DEBUG("(READ from fd %d offset %llu len %u), ", fhandle, (long long un... | 0 | [
"CWE-399",
"CWE-310"
] | nbd | 741495cb08503fd32a9d22648e63b64390c601f4 | 11,811,856,297,950,912,000,000,000,000,000,000,000 | 15 | nbd-server: handle modern-style negotiation in a child process
Previously, the modern style negotiation was carried out in the root
server (listener) process before forking the actual client handler. This
made it possible for a malfunctioning or evil client to terminate the
root process simply by querying a non-existe... |
static ssize_t qemu_net_queue_deliver_iov(NetQueue *queue,
NetClientState *sender,
unsigned flags,
const struct iovec *iov,
int iovcnt)
{
ssize_t re... | 0 | [
"CWE-835"
] | qemu | 705df5466c98f3efdd2b68d3b31dad86858acad7 | 53,156,313,557,292,130,000,000,000,000,000,000,000 | 14 | net: introduce qemu_receive_packet()
Some NIC supports loopback mode and this is done by calling
nc->info->receive() directly which in fact suppresses the effort of
reentrancy check that is done in qemu_net_queue_send().
Unfortunately we can't use qemu_net_queue_send() here since for
loopback there's no sender as pee... |
GF_Err rvcc_box_read(GF_Box *s,GF_BitStream *bs)
{
GF_RVCConfigurationBox *ptr = (GF_RVCConfigurationBox*)s;
ISOM_DECREASE_SIZE(ptr, 2);
ptr->predefined_rvc_config = gf_bs_read_u16(bs);
if (!ptr->predefined_rvc_config) {
ISOM_DECREASE_SIZE(ptr, 2);
ptr->rvc_meta_idx = gf_bs_read_u16(bs);
}
return GF_OK; | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 197,643,417,931,726,200,000,000,000,000,000,000,000 | 11 | fixed #1587 |
int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509,
STACK_OF(X509) *chain)
{
int ret = 1;
ctx->ctx = store;
ctx->current_method = 0;
ctx->cert = x509;
ctx->untrusted = chain;
ctx->crls = NULL;
ctx->last_untrusted = 0;
ctx->other_ctx = NULL;... | 0 | [
"CWE-119"
] | openssl | 370ac320301e28bb615cee80124c042649c95d14 | 127,364,591,283,017,300,000,000,000,000,000,000,000 | 121 | Fix length checks in X509_cmp_time to avoid out-of-bounds reads.
Also tighten X509_cmp_time to reject more than three fractional
seconds in the time; and to reject trailing garbage after the offset.
CVE-2015-1789
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org> |
static void print_var_int(const char *var, int val)
{
printf("%s=%d\n", var, val);
} | 0 | [
"CWE-119",
"CWE-787"
] | git | de1e67d0703894cb6ea782e36abb63976ab07e60 | 262,657,128,558,029,000,000,000,000,000,000,000,000 | 4 | list-objects: pass full pathname to callbacks
When we find a blob at "a/b/c", we currently pass this to
our show_object_fn callbacks as two components: "a/b/" and
"c". Callbacks which want the full value then call
path_name(), which concatenates the two. But this is an
inefficient interface; the path is a strbuf, and ... |
static int i40e_vsi_control_rx(struct i40e_vsi *vsi, bool enable)
{
struct i40e_pf *pf = vsi->back;
int i, pf_q, ret = 0;
pf_q = vsi->base_queue;
for (i = 0; i < vsi->num_queue_pairs; i++, pf_q++) {
ret = i40e_control_wait_rx_q(pf, pf_q, enable);
if (ret) {
dev_info(&pf->pdev->dev,
"VSI seid %d Rx ring... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 283,067,586,073,651,770,000,000,000,000,000,000,000 | 24 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
static void audit_log_vformat(struct audit_buffer *ab, const char *fmt,
va_list args)
{
int len, avail;
struct sk_buff *skb;
va_list args2;
if (!ab)
return;
BUG_ON(!ab->skb);
skb = ab->skb;
avail = skb_tailroom(skb);
if (avail == 0) {
avail = audit_expand(ab, AUDIT_BUFSIZ);
if (!avail)
goto ... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 241,619,543,529,882,500,000,000,000,000,000,000,000 | 37 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
static void bfq_update_has_short_ttime(struct bfq_data *bfqd,
struct bfq_queue *bfqq,
struct bfq_io_cq *bic)
{
bool has_short_ttime = true, state_changed;
/*
* No need to update has_short_ttime if bfqq is async or in
* idle io prio class, or if bfq_slice_idle is zero, because
* no device... | 0 | [
"CWE-416"
] | linux | 2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9 | 67,562,039,587,602,550,000,000,000,000,000,000,000 | 126 | block, bfq: fix use-after-free in bfq_idle_slice_timer_body
In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is
not in bfqd-lock critical section. The bfqq, which is not
equal to NULL in bfq_idle_slice_timer, may be freed after passing
to bfq_idle_slice_timer_body. So we will access the freed memory.
In ad... |
static void free_cache_attributes(unsigned int cpu)
{
if (!per_cpu_cacheinfo(cpu))
return;
cache_shared_cpu_map_remove(cpu);
kfree(per_cpu_cacheinfo(cpu));
per_cpu_cacheinfo(cpu) = NULL;
} | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 124,577,125,037,830,800,000,000,000,000,000,000,000 | 10 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
GF_Err dvcC_box_read(GF_Box *s, GF_BitStream *bs)
{
u32 i;
GF_DOVIConfigurationBox *ptr = (GF_DOVIConfigurationBox *)s;
//GF_DOVIDecoderConfigurationRecord
ISOM_DECREASE_SIZE(ptr, 24)
ptr->DOVIConfig.dv_version_major = gf_bs_read_u8(bs);
ptr->DOVIConfig.dv_version_minor = gf_bs_read_u8(bs);
ptr->DOVIConfig.dv_p... | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 5,190,572,258,184,945,000,000,000,000,000,000,000 | 31 | fixed #2255 |
int
number_of_args ()
{
register WORD_LIST *list;
int n;
for (n = 0; n < 9 && dollar_vars[n+1]; n++)
;
for (list = rest_of_args; list; list = list->next)
n++;
return n; | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 98,570,746,224,952,860,000,000,000,000,000,000,000 | 11 | Bash-4.4 patch 7 |
int _gnutls_openpgp_send_fingerprint(gnutls_session_t session)
{
return session->internals.pgp_fingerprint;
} | 0 | [
"CWE-400"
] | gnutls | 1ffb827e45721ef56982d0ffd5c5de52376c428e | 148,759,423,530,633,240,000,000,000,000,000,000,000 | 4 | handshake: set a maximum number of warning messages that can be received per handshake
That is to avoid DoS due to the assymetry of cost of sending an alert vs the cost
of processing. |
vhost_user_get_protocol_features(struct virtio_net **pdev,
struct VhostUserMsg *msg,
int main_fd __rte_unused)
{
struct virtio_net *dev = *pdev;
uint64_t features, protocol_features;
rte_vhost_driver_get_features(dev->ifname, &features);
rte_vhost_driver_get_protocol_features(dev->ifname, &protocol_features)... | 1 | [] | dpdk | bf472259dde6d9c4dd3ebad2c2b477a168c6e021 | 280,931,358,325,291,860,000,000,000,000,000,000,000 | 25 | vhost: fix possible denial of service by leaking FDs
A malicious Vhost-user master could send in loop hand-crafted
vhost-user messages containing more file descriptors the
vhost-user slave expects. Doing so causes the application using
the vhost-user library to run out of FDs.
This issue has been assigned CVE-2019-14... |
_kdc_make_anonymous_principalname (PrincipalName *pn)
{
pn->name_type = KRB5_NT_PRINCIPAL;
pn->name_string.len = 1;
pn->name_string.val = malloc(sizeof(*pn->name_string.val));
if (pn->name_string.val == NULL)
return ENOMEM;
pn->name_string.val[0] = strdup("anonymous");
if (pn->name_string.val[0... | 0 | [
"CWE-476"
] | heimdal | 1a6a6e462dc2ac6111f9e02c6852ddec4849b887 | 97,157,763,665,391,770,000,000,000,000,000,000,000 | 15 | Security: Avoid NULL structure pointer member dereference
This can happen in the error path when processing malformed AS
requests with a NULL client name. Bug originally introduced on
Fri Feb 13 09:26:01 2015 +0100 in commit:
a873e21d7c06f22943a90a41dc733ae76799390d
kdc: base _kdc_fast_mk_error() on krb5_mk... |
static void sctp_inet6_skb_msgname(struct sk_buff *skb, char *msgname,
int *addr_len)
{
union sctp_addr *addr;
struct sctphdr *sh;
if (!msgname)
return;
addr = (union sctp_addr *)msgname;
sh = sctp_hdr(skb);
if (ip_hdr(skb)->version == 4) {
addr->v4.sin_family = AF_INET;
addr->v4.sin_port = sh->so... | 0 | [
"CWE-241"
] | linux | fdcee2cbb8438702ea1b328fb6e0ac5e9a40c7f8 | 254,790,360,616,881,750,000,000,000,000,000,000,000 | 28 | sctp: do not inherit ipv6_{mc|ac|fl}_list from parent
SCTP needs fixes similar to 83eaddab4378 ("ipv6/dccp: do not inherit
ipv6_mc_list from parent"), otherwise bad things can happen.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <a... |
ConsumerDA(qqueue_t *pThis, wti_t *pWti)
{
int i;
int iCancelStateSave;
DEFiRet;
ISOBJ_TYPE_assert(pThis, qqueue);
ISOBJ_TYPE_assert(pWti, wti);
CHKiRet(DequeueForConsumer(pThis, pWti));
/* we now have a non-idle batch of work, so we can release the queue mutex and process it */
d_pthread_mutex_unlock(pThis-... | 0 | [
"CWE-772"
] | rsyslog | dfa88369d4ca4290db56b843f9eabdae1bfe0fd5 | 137,498,183,340,975,470,000,000,000,000,000,000,000 | 38 | bugfix: memory leak when $RepeatedMsgReduction on was used
bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=225 |
void term_refresh_freeze(void)
{
freeze_counter++;
} | 0 | [
"CWE-476"
] | irssi | 6c6c42e3d1b49d90aacc0b67f8540471cae02a1d | 146,713,175,360,543,310,000,000,000,000,000,000,000 | 4 | Merge branch 'security' into 'master'
See merge request !7 |
GF_Err trik_Write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
u32 i;
GF_TrickPlayBox *ptr = (GF_TrickPlayBox *) s;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
for (i=0; i < ptr->entry_count; i++ ) {
gf_bs_write_int(bs, ptr->entries[i].pic_type, 2);
gf_bs_write_int(bs, ptr->entries[i].dependency_level,... | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 177,470,280,773,327,380,000,000,000,000,000,000,000 | 15 | prevent dref memleak on invalid input (#1183) |
flatpak_context_allow_host_fs (FlatpakContext *context)
{
flatpak_context_take_filesystem (context, g_strdup ("host"), FLATPAK_FILESYSTEM_MODE_READ_WRITE);
} | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | 6e5ae7a109cdfa9735ea7ccbd8cb79f9e8d3ae8b | 164,504,300,853,437,240,000,000,000,000,000,000,000 | 4 | context: Add --env-fd option
This allows environment variables to be added to the context without
making their values visible to processes running under a different uid,
which might be significant if the variable's value is a token or some
other secret value.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of... |
isLogicalOp2(int n, SWF_ACTION *actions,int maxn)
{
switch(OpCode(actions, n, maxn))
{
case SWFACTION_LOGICALNOT:
case SWFACTION_PUSHDUP:
case SWFACTION_IF:
return 1;
default:
return 0;
}
} | 0 | [
"CWE-119",
"CWE-125"
] | libming | da9d86eab55cbf608d5c916b8b690f5b76bca462 | 197,260,805,234,970,860,000,000,000,000,000,000,000 | 12 | decompileAction: Prevent heap buffer overflow and underflow with using OpCode |
rsvg_new_defs (void)
{
RsvgNodeGroup *group;
group = g_new (RsvgNodeGroup, 1);
_rsvg_node_init (&group->super);
group->super.draw = _rsvg_node_draw_nothing;
group->super.set_atts = rsvg_node_group_set_atts;
return &group->super;
} | 1 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 259,219,806,598,393,420,000,000,000,000,000,000,000 | 9 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
void ext4_evict_inode(struct inode *inode)
{
handle_t *handle;
int err;
trace_ext4_evict_inode(inode);
if (inode->i_nlink) {
/*
* When journalling data dirty buffers are tracked only in the
* journal. So although mm thinks everything is clean and
* ready for reaping the inode might still have some page... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 146,264,771,920,460,260,000,000,000,000,000,000,000 | 132 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
void deliverDataWithoutErrorCheck(
Buf data,
bool writes = true,
folly::SocketAddress* peer = nullptr) {
data->coalesce();
server->onNetworkData(
peer == nullptr ? clientAddr : *peer,
NetworkData(std::move(data), Clock::now()));
if (writes) {
loopForWrites();
}
... | 0 | [
"CWE-617",
"CWE-703"
] | mvfst | a67083ff4b8dcbb7ee2839da6338032030d712b0 | 102,001,090,774,001,870,000,000,000,000,000,000,000 | 12 | Close connection if we derive an extra 1-rtt write cipher
Summary: Fixes CVE-2021-24029
Reviewed By: mjoras, lnicco
Differential Revision: D26613890
fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945 |
static void enqueue_hrtimer(struct hrtimer *timer,
struct hrtimer_clock_base *base, int reprogram)
{
struct rb_node **link = &base->active.rb_node;
struct rb_node *parent = NULL;
struct hrtimer *entry;
/*
* Find the right place in the rbtree:
*/
while (*link) {
parent = *link;
entry = rb_entry(pare... | 0 | [
"CWE-189"
] | linux-2.6 | 13788ccc41ceea5893f9c747c59bc0b28f2416c2 | 261,477,176,622,635,470,000,000,000,000,000,000,000 | 51 | [PATCH] hrtimer: prevent overrun DoS in hrtimer_forward()
hrtimer_forward() does not check for the possible overflow of
timer->expires. This can happen on 64 bit machines with large interval
values and results currently in an endless loop in the softirq because the
expiry value becomes negative and therefor the timer... |
parser_flush_cbc (parser_context_t *context_p) /**< context */
{
uint8_t flags;
uint16_t last_opcode = context_p->last_cbc_opcode;
if (last_opcode == PARSER_CBC_UNAVAILABLE)
{
return;
}
context_p->status_flags |= PARSER_NO_END_LABEL;
if (PARSER_IS_BASIC_OPCODE (last_opcode))
{
cbc_opcode_t op... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 91,647,621,324,252,150,000,000,000,000,000,000,000 | 138 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
mp_buf *mp_buf_new(lua_State *L) {
mp_buf *buf = NULL;
/* Old size = 0; new size = sizeof(*buf) */
buf = (mp_buf*)mp_realloc(L, NULL, 0, sizeof(*buf));
buf->b = NULL;
buf->len = buf->free = 0;
return buf;
} | 0 | [
"CWE-119",
"CWE-787"
] | redis | 52a00201fca331217c3b4b8b634f6a0f57d6b7d3 | 51,014,757,588,471,830,000,000,000,000,000,000,000 | 10 | Security: fix Lua cmsgpack library stack overflow.
During an auditing effort, the Apple Vulnerability Research team discovered
a critical Redis security issue affecting the Lua scripting part of Redis.
-- Description of the problem
Several years ago I merged a pull request including many small changes at
the Lua Msg... |
static int ras_putdatastd(jas_stream_t *out, ras_hdr_t *hdr, jas_image_t *image, int numcmpts, int *cmpts)
{
int rowsize;
int pad;
unsigned int z;
int nz;
int c;
int x;
int y;
int v;
jas_matrix_t *data[3];
int i;
assert(numcmpts <= 3);
if (RAS_ISRGB(hdr) && numcmpts < 3) {
/* need 3 components for RGB ... | 0 | [
"CWE-476"
] | jasper | 12db8078ba17a8ffc5cc2429fb506988f0f11b44 | 267,689,767,310,638,060,000,000,000,000,000,000,000 | 93 | ras_enc: check components for RGB, fixes NULL pointer dereference
Fixes CVE-2018-18873
Closes https://github.com/jasper-maint/jasper/issues/15
Closes https://github.com/mdadams/jasper/issues/184 |
static void proc_SSID_on_close(struct inode *inode, struct file *file)
{
struct proc_data *data = file->private_data;
struct proc_dir_entry *dp = PDE(inode);
struct net_device *dev = dp->data;
struct airo_info *ai = dev->ml_priv;
SsidRid SSID_rid;
int i;
char *p = data->wbuffer;
char *end = p + data->writelen;
... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 308,152,333,182,410,200,000,000,000,000,000,000,000 | 36 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
static int sample_action_to_attr(const struct nlattr *attr,
struct sk_buff *skb)
{
struct nlattr *start, *ac_start = NULL, *sample_arg;
int err = 0, rem = nla_len(attr);
const struct sample_arg *arg;
struct nlattr *actions;
start = nla_nest_start_noflag(skb, OVS_ACTION_ATTR_SAMPLE);
if (!start)
return -EM... | 0 | [
"CWE-362",
"CWE-787"
] | linux | cefa91b2332d7009bc0be5d951d6cbbf349f90f8 | 120,881,992,367,108,620,000,000,000,000,000,000,000 | 40 | openvswitch: fix OOB access in reserve_sfa_size()
Given a sufficiently large number of actions, while copying and
reserving memory for a new action of a new flow, if next_offset is
greater than MAX_ACTIONS_BUFSIZE, the function reserve_sfa_size() does
not return -EMSGSIZE as expected, but it allocates MAX_ACTIONS_BUFS... |
static void drms_uA_update(struct regulator_dev *rdev)
{
struct regulator *sibling;
int current_uA = 0, output_uV, input_uV, err;
unsigned int mode;
err = regulator_check_drms(rdev);
if (err < 0 || !rdev->desc->ops->get_optimum_mode ||
(!rdev->desc->ops->get_voltage &&
!rdev->desc->ops->get_voltage_sel... | 0 | [
"CWE-416"
] | linux | 60a2362f769cf549dc466134efe71c8bf9fbaaba | 148,408,422,322,773,000,000,000,000,000,000,000,000 | 40 | regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing
After freeing pin from regulator_ena_gpio_free, loop can access
the pin. So this patch fixes not to access pin after freeing.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org> |
ff_layout_get_ds_for_read(struct nfs_pageio_descriptor *pgio,
u32 *best_idx)
{
struct pnfs_layout_segment *lseg = pgio->pg_lseg;
struct nfs4_pnfs_ds *ds;
ds = ff_layout_choose_best_ds_for_read(lseg, pgio->pg_mirror_idx,
best_idx);
if (ds || !pgio->pg_mirror_idx)
return ds;
return ff_layout_choo... | 0 | [
"CWE-787"
] | linux | ed34695e15aba74f45247f1ee2cf7e09d449f925 | 254,909,909,558,430,360,000,000,000,000,000,000,000 | 12 | pNFS/flexfiles: fix incorrect size check in decode_nfs_fh()
We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym
bazalii) observed the check:
if (fh->size > sizeof(struct nfs_fh))
should not use the size of the nfs_fh struct which includes an extra two
bytes from the size field.
struct nfs_fh {
unsi... |
static uint64_t type(wchar_t) { return Arg::CHAR; } | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 280,337,968,264,016,130,000,000,000,000,000,000,000 | 1 | Fix segfault on complex pointer formatting (#642) |
GF_Err BM_SceneReplace(GF_BifsDecoder *codec, GF_BitStream *bs, GF_List *com_list)
{
GF_Command *com;
GF_Node *backup_root;
GF_List *backup_routes;
GF_Err BD_DecSceneReplace(GF_BifsDecoder * codec, GF_BitStream *bs, GF_List *proto_list);
backup_routes = codec->scenegraph->Routes;
backup_root = codec->scenegraph-... | 0 | [
"CWE-416"
] | gpac | c535bad50d5812d27ee5b22b54371bddec411514 | 163,983,100,679,455,980,000,000,000,000,000,000,000 | 37 | fixed #2194 |
void DataWriterImpl::InnerDataWriterListener::onWriterMatched(
RTPSWriter* /*writer*/,
const PublicationMatchedStatus& info)
{
DataWriterListener* listener = data_writer_->get_listener_for(StatusMask::publication_matched());
if (listener != nullptr)
{
listener->on_publication_matched... | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 100,631,096,466,154,860,000,000,000,000,000,000,000 | 10 | check remote permissions (#1387)
* Refs 5346. Blackbox test
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. one-way string compare
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. Do not add partition separator on last partition
Signed-off-by: Iker Luengo <ikerluengo@e... |
gst_rtsp_connection_set_tunneled (GstRTSPConnection * conn, gboolean tunneled)
{
g_return_if_fail (conn != NULL);
g_return_if_fail (conn->read_socket == NULL);
g_return_if_fail (conn->write_socket == NULL);
conn->tunneled = tunneled;
} | 0 | [] | gst-plugins-base | f672277509705c4034bc92a141eefee4524d15aa | 36,592,599,715,185,430,000,000,000,000,000,000,000 | 8 | gstrtspconnection: Security loophole making heap overflow
The former code allowed an attacker to create a heap overflow by
sending a longer than allowed session id in a response and including a
semicolon to change the maximum length. With this change, the parser
will never go beyond 512 bytes. |
LogLevelSetter::LogLevelSetter(spdlog::level::level_enum log_level) {
for (Logger::Logger& logger : Logger::Registry::loggers()) {
previous_levels_.push_back(logger.level());
logger.setLevel(log_level);
}
} | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 126,366,933,397,877,920,000,000,000,000,000,000,000 | 6 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
void gf_isom_delete_text_sample(GF_TextSample * tx_samp)
{
gf_isom_text_reset(tx_samp);
gf_list_del(tx_samp->others);
gf_free(tx_samp);
} | 0 | [
"CWE-476"
] | gpac | d527325a9b72218612455a534a508f9e1753f76e | 120,252,502,786,092,660,000,000,000,000,000,000,000 | 6 | fixed #1768 |
combineSeparateSamples24bits (uint8 *in[], uint8 *out, uint32 cols,
uint32 rows, uint16 spp, uint16 bps,
FILE *dumpfile, int format, int level)
{
int ready_bits = 0 /*, bytes_per_sample = 0 */;
uint32 src_rowsize, dst_rowsize;
uint32 bit_offset, src_offs... | 0 | [
"CWE-125"
] | libtiff | 21d39de1002a5e69caa0574b2cc05d795d6fbfad | 40,442,264,103,802,620,000,000,000,000,000,000,000 | 122 | * tools/tiffcrop.c: fix multiple uint32 overflows in
writeBufferToSeparateStrips(), writeBufferToContigTiles() and
writeBufferToSeparateTiles() that could cause heap buffer overflows.
Reported by Henri Salo from Nixu Corporation.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2592 |
static inline int wants_signal(int sig, struct task_struct *p)
{
if (sigismember(&p->blocked, sig))
return 0;
if (p->flags & PF_EXITING)
return 0;
if (sig == SIGKILL)
return 1;
if (task_is_stopped_or_traced(p))
return 0;
return task_curr(p) || !signal_pending(p);
} | 0 | [] | linux-2.6 | 0083fc2c50e6c5127c2802ad323adf8143ab7856 | 290,291,531,381,696,980,000,000,000,000,000,000,000 | 12 | do_sigaltstack: avoid copying 'stack_t' as a structure to user space
Ulrich Drepper correctly points out that there is generally padding in
the structure on 64-bit hosts, and that copying the structure from
kernel to user space can leak information from the kernel stack in those
padding bytes.
Avoid the whole issue b... |
static int ext4_expand_extra_isize(struct inode *inode,
unsigned int new_extra_isize,
struct ext4_iloc iloc,
handle_t *handle)
{
struct ext4_inode *raw_inode;
struct ext4_xattr_ibody_header *header;
if (EXT4_I(inode)->i_extra_isize >= new_extra_isize)
return 0;
raw_inode = ext4_raw_inode(&i... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 48,043,131,323,060,670,000,000,000,000,000,000,000 | 28 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
dse_read_file(struct dse *pdse, Slapi_PBlock *pb)
{
int rc = 1; /* Good */
int ii;
char **filelist = 0;
char *filename = 0;
filelist = charray_dup(pdse->dse_filelist);
filename = slapi_ch_strdup(pdse->dse_filename);
for (ii = 0; rc && filelist && filelist[ii]; ++ii) {
if (strcasecm... | 0 | [
"CWE-200",
"CWE-203"
] | 389-ds-base | b6aae4d8e7c8a6ddd21646f94fef1bf7f22c3f32 | 121,795,803,160,709,260,000,000,000,000,000,000,000 | 25 | Issue 4609 - CVE - info disclosure when authenticating
Description: If you bind as a user that does not exist. Error 49 is returned
instead of error 32. As error 32 discloses that the entry does
not exist. When you bind as an entry that does not have userpassword
set then ... |
static inline bool io_file_need_scm(struct file *filp)
{
return false;
} | 0 | [
"CWE-416"
] | linux | 9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7 | 289,480,871,277,664,850,000,000,000,000,000,000,000 | 4 | io_uring: reinstate the inflight tracking
After some debugging, it was realized that we really do still need the
old inflight tracking for any file type that has io_uring_fops assigned.
If we don't, then trivial circular references will mean that we never get
the ctx cleaned up and hence it'll leak.
Just bring back t... |
static void xhci_check_intr_iso_kick(XHCIState *xhci, XHCITransfer *xfer,
XHCIEPContext *epctx, uint64_t mfindex)
{
if (xfer->mfindex_kick > mfindex) {
timer_mod(epctx->kick_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) +
(xfer->mfindex_kick - mfind... | 0 | [
"CWE-835"
] | qemu | 96d87bdda3919bb16f754b3d3fd1227e1f38f13c | 155,340,504,125,055,000,000,000,000,000,000,000,000 | 13 | xhci: guard xhci_kick_epctx against recursive calls
Track xhci_kick_epctx processing being active in a variable. Check the
variable before calling xhci_kick_epctx from xhci_kick_ep. Add an
assert to make sure we don't call recursively into xhci_kick_epctx.
Cc: 1653384@bugs.launchpad.net
Fixes: 94b037f2a451b3dc855f9... |
static int do_recv_NPEmbedPrint(rpc_message_t *message, void *p_value)
{
NPEmbedPrint *embedPrint = (NPEmbedPrint *)p_value;
int error;
if ((error = do_recv_NPWindowData(message, &embedPrint->window)) < 0)
return error;
embedPrint->platformPrint = NULL; // to be filled in by the plugin
return RPC_ERROR_NO_... | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 29,352,789,916,630,003,000,000,000,000,000,000,000 | 11 | Support all the new variables added |
varexpand(struct magic_set *ms, char *buf, size_t len, const char *str)
{
const char *ptr, *sptr, *e, *t, *ee, *et;
size_t l;
for (sptr = str; (ptr = strstr(sptr, "${")) != NULL;) {
l = CAST(size_t, ptr - sptr);
if (l >= len)
return -1;
memcpy(buf, sptr, l);
buf += l;
len -= l;
ptr += 2;
if (!*ptr ... | 0 | [
"CWE-787"
] | php-src | ca6d511fa54b34d5b75bf120a86482a1b9e1e686 | 215,704,282,649,334,240,000,000,000,000,000,000,000 | 52 | Fix #81723: Memory corruption in finfo_buffer()
We need to use the same memory allocator throughout. |
static rsRetVal qDeqFixedArray(qqueue_t *pThis, void **out)
{
DEFiRet;
ASSERT(pThis != NULL);
*out = (void*) pThis->tVars.farray.pBuf[pThis->tVars.farray.deqhead];
pThis->tVars.farray.deqhead++;
if (pThis->tVars.farray.deqhead == pThis->iMaxQueueSize)
pThis->tVars.farray.deqhead = 0;
RETiRet;
} | 0 | [
"CWE-772"
] | rsyslog | dfa88369d4ca4290db56b843f9eabdae1bfe0fd5 | 86,508,847,247,329,870,000,000,000,000,000,000,000 | 13 | bugfix: memory leak when $RepeatedMsgReduction on was used
bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=225 |
zfs_acl_ids_create(znode_t *dzp, int flag, vattr_t *vap, cred_t *cr,
vsecattr_t *vsecp, zfs_acl_ids_t *acl_ids)
{
int error;
zfsvfs_t *zfsvfs = dzp->z_zfsvfs;
zfs_acl_t *paclp;
gid_t gid;
boolean_t need_chmod = B_TRUE;
boolean_t trim = B_FALSE;
boolean_t inherited = B_FALSE;
if ((flag & IS_ROOT_NODE) == ... | 0 | [
"CWE-200",
"CWE-732"
] | zfs | 716b53d0a14c72bda16c0872565dd1909757e73f | 165,871,899,003,326,740,000,000,000,000,000,000,000 | 127 | FreeBSD: Fix UNIX permissions checking
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #10727 |
GF_Err dvcC_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_DOVIConfigurationBox *ptr = (GF_DOVIConfigurationBox *) s;
if (!s) return GF_BAD_PARAM;
e = gf_isom_box_write_header(s, bs);
if (e) return e;
//GF_DOVIDecoderConfigurationRecord
gf_bs_write_u8(bs, ptr->DOVIConfig.dv_version_major);
gf_bs_write... | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 176,670,966,671,996,800,000,000,000,000,000,000,000 | 26 | fixed #2255 |
static int qeth_core_freeze(struct ccwgroup_device *gdev)
{
struct qeth_card *card = dev_get_drvdata(&gdev->dev);
if (card->discipline && card->discipline->freeze)
return card->discipline->freeze(gdev);
return 0;
} | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 48,742,522,761,445,730,000,000,000,000,000,000,000 | 7 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
finalize_domain_objects (DomainFinalizationReq *req)
{
MonoDomain *domain = req->domain;
#ifdef HAVE_BOEHM_GC
while (g_hash_table_size (domain->finalizable_objects_hash) > 0) {
int i;
GPtrArray *objs;
/*
* Since the domain is unloading, nobody is allowed to put
* new entries into the hash table. But fin... | 0 | [
"CWE-399",
"CWE-264"
] | mono | 8eb1189099e02372fd45ca1c67230eccf1edddc0 | 140,264,971,115,256,300,000,000,000,000,000,000,000 | 46 | Implement a reference queue API.
* gc.c: A reference queue allows one to queue
callbcks for when objects are collected.
It allows for safe cleanup of objects that can
only be done when it is effectively collected.
The major difference with regular finalization
is that the collector makes sure the object
was col... |
void MACH0_(kv_loadlibs)(struct MACH0_(obj_t) *bin) {
int i;
char lib_flagname[128];
for (i = 0; i < bin->nlibs; i++) {
snprintf (lib_flagname, sizeof (lib_flagname), "libs.%d.name", i);
sdb_set (bin->kv, lib_flagname, bin->libs[i], 0);
}
} | 0 | [
"CWE-787"
] | radare2 | ca8d8b39f3e34a4fd943270330b80f1148129de4 | 299,360,719,745,062,000,000,000,000,000,000,000,000 | 8 | Fix oobread in the macho parser ##crash
* Reported by @Han0nly via huntr.dev
* Reproducers: heapoverflow1
* BountyID: e589bd97-4c74-4e79-93b5-0951a281facc |
//! Save image as a .cimg file \overloading.
const CImg<T>& save_cimg(std::FILE *const file, const bool is_compressed=false) const {
CImgList<T>(*this,true).save_cimg(file,is_compressed);
return *this; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 195,075,043,449,028,100,000,000,000,000,000,000,000 | 4 | Fix other issues in 'CImg<T>::load_bmp()'. |
kill_labels(TERMTYPE2 *tterm, int target)
{
int n;
int result = 0;
char *cap;
char name[10];
for (n = 0; n <= 10; ++n) {
_nc_SPRINTF(name, _nc_SLIMIT(sizeof(name)) "lf%d", n);
cap = find_string(tterm, name);
if (VALID_STRING(cap)
&& kill_string(tterm, cap)) {
target -= (int) (strlen(ca... | 0 | [
"CWE-125"
] | ncurses | b025434573f466efe27862656a6a9d41dd2bd609 | 325,192,957,324,241,030,000,000,000,000,000,000,000 | 20 | ncurses 6.1 - patch 20191012
+ amend recent changes to ncurses*-config and pc-files to filter out
Debian linker-flags (report by Sven Joachim, cf: 20150516).
+ clarify relationship between tic, infocmp and captoinfo in manpage.
+ check for invalid hashcode in _nc_find_type_entry and
_nc_find_name_entry.
> fix seve... |
static Formattable* createArrayCopy(const Formattable* array, int32_t count) {
Formattable *result = new Formattable[count];
if (result != NULL) {
for (int32_t i=0; i<count; ++i)
result[i] = array[i]; // Don't memcpy!
}
return result;
} | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 109,329,547,392,486,120,000,000,000,000,000,000,000 | 8 | ICU-20246 Fixing another integer overflow in number parsing. |
CRYPTO_THREAD_ID CRYPTO_THREAD_get_current_id(void)
{
return GetCurrentThreadId();
} | 0 | [
"CWE-330"
] | openssl | 1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be | 103,303,845,827,607,790,000,000,000,000,000,000,000 | 4 | drbg: ensure fork-safety without using a pthread_atfork handler
When the new OpenSSL CSPRNG was introduced in version 1.1.1,
it was announced in the release notes that it would be fork-safe,
which the old CSPRNG hadn't been.
The fork-safety was implemented using a fork count, which was
incremented by a pthread_atfork... |
void dnotify_parent(struct dentry *dentry, unsigned long event)
{
struct dentry *parent;
if (!dir_notify_enable)
return;
spin_lock(&dentry->d_lock);
parent = dentry->d_parent;
if (parent->d_inode->i_dnotify_mask & event) {
dget(parent);
spin_unlock(&dentry->d_lock);
__inode_dir_notify(parent->d_inode, ev... | 0 | [
"CWE-362"
] | linux-2.6 | 214b7049a7929f03bbd2786aaef04b8b79db34e2 | 209,917,504,689,263,100,000,000,000,000,000,000,000 | 18 | Fix dnotify/close race
We have a race between fcntl() and close() that can lead to
dnotify_struct inserted into inode's list *after* the last descriptor
had been gone from current->files.
Since that's the only point where dnotify_struct gets evicted, we are
screwed - it will stick around indefinitely. Even after str... |
static int imap_tags_edit(struct Mailbox *m, const char *tags, char *buf, size_t buflen)
{
struct ImapMboxData *mdata = imap_mdata_get(m);
if (!mdata)
return -1;
char *new_tag = NULL;
char *checker = NULL;
/* Check for \* flags capability */
if (!imap_has_flag(&mdata->flags, NULL))
{
mutt_error(... | 0 | [
"CWE-94",
"CWE-74"
] | neomutt | fb013ec666759cb8a9e294347c7b4c1f597639cc | 231,063,775,406,788,660,000,000,000,000,000,000,000 | 75 | tls: clear data after a starttls acknowledgement
After a starttls acknowledgement message, clear the buffers of any
incoming data / commands. This will ensure that all future data is
handled securely.
Co-authored-by: Pietro Cerutti <gahr@gahr.ch> |
set_nextcmd(exarg_T *eap, char_u *arg)
{
char_u *p = check_nextcmd(arg);
if (eap->nextcmd == NULL)
eap->nextcmd = p;
else if (p != NULL)
// cannot use "| command" inside a {} block
semsg(_(e_cannot_use_bar_to_separate_commands_here_str), arg);
} | 0 | [
"CWE-122"
] | vim | 35a319b77f897744eec1155b736e9372c9c5575f | 126,201,203,370,957,990,000,000,000,000,000,000,000 | 10 | patch 8.2.3489: ml_get error after search with range
Problem: ml_get error after search with range.
Solution: Limit the line number to the buffer line count. |
*/
static int io_cqring_wait(struct io_ring_ctx *ctx, int min_events,
const sigset_t __user *sig, size_t sigsz,
struct __kernel_timespec __user *uts)
{
struct io_wait_queue iowq = {
.wq = {
.private = current,
.func = io_wake_function,
.entry = LIST_HEAD_INIT(iowq.wq.entry),
},
.ctx = ctx,... | 0 | [
"CWE-125"
] | linux | 89c2b3b74918200e46699338d7bcc19b1ea12110 | 309,959,076,115,877,860,000,000,000,000,000,000,000 | 65 | io_uring: reexpand under-reexpanded iters
[ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900
[ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task
syz-executor.0/828
[ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted
5.14.0-rc3-next-20210730 #1
[ 74.216525] Hardware n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.